all repos — emessage @ ea493bafc2d2157978bab4ad3fda9ab450a6a361

The EMessage email client

prerelease 5
Robert Ismo me@robertismo.com
Thu, 25 Jun 2026 15:11:54 -0500
commit

ea493bafc2d2157978bab4ad3fda9ab450a6a361

parent

4bcb5fdb8c1e3bae90141b5de4f9040e22dda1a8

4 files changed, 18 insertions(+), 10 deletions(-)

jump to
M app.goapp.go

@@ -64,6 +64,9 @@ },

OnUpdateFailure: func(err error) { app.Log("Update failed: %v.", err.Error()).Stdout().StatusLine() }, + OnFinally: func() { + app.Log("Finished updating.").Stdout().StatusLine() + }, } go updater.Update() go func() {
M go-selfupdate/selfupdate/selfupdate.gogo-selfupdate/selfupdate/selfupdate.go

@@ -68,6 +68,7 @@ OnSuccessfulUpdate func() // Optional function to run after an update has successfully taken place

OnPreFetch func() OnUpdateAttempt func() // Optional: called when an update attempt begins (after info fetch, before patch/full fetch) OnUpdateFailure func(error) // Optional: called when an update fails with the error + OnFinally func() } func (u *Updater) getExecRelativeDir(dir string) string {

@@ -181,14 +182,17 @@ }

// Update initiates the self update process func (u *Updater) Update() error { + if u.OnFinally != nil { + defer u.OnFinally() + } if u.OnPreFetch != nil { - u.OnPreFetch() - } + u.OnPreFetch() + } path, err := os.Executable() if err != nil { if u.OnUpdateFailure != nil { - u.OnUpdateFailure(err) - } + u.OnUpdateFailure(err) + } return err }

@@ -214,8 +218,8 @@ }

defer old.Close() if u.OnUpdateAttempt != nil { - u.OnUpdateAttempt() - } + u.OnUpdateAttempt() + } bin, err := u.fetchAndVerifyPatch(old) if err != nil {

@@ -236,8 +240,8 @@ } else {

log.Println("update: fetching full binary,", err) } if u.OnUpdateFailure != nil { - u.OnUpdateFailure(err) - } + u.OnUpdateFailure(err) + } return err } }
M install.shinstall.sh

@@ -60,8 +60,8 @@ fi

echo "Latest macOS bundle version: ${VERSION}" - # Download the darwin-app tarball (uncompressed tar, as built by the build script) - BUNDLE_URL="${SERVER_URL}/${APP_NAME}/darwin-app" + # Download the versioned darwin-app tarball + BUNDLE_URL="${SERVER_URL}/${APP_NAME}/${VERSION}/darwin-app" TMP_DIR=$(mktemp -d) TMP_TAR="${TMP_DIR}/${APP_NAME}.tar"
M release.gorelease.go

@@ -7,6 +7,7 @@

var ( EMessageRemoteServerAddress = "https://emessage.machinetele.com" EMessageVersionHistory = []string{ + "prerelease.5", "prerelease.4", "prerelease.3", "prerelease.2",