prerelease 5
Robert Ismo me@robertismo.com
Thu, 25 Jun 2026 15:11:54 -0500
4 files changed,
18 insertions(+),
10 deletions(-)
M
go-selfupdate/selfupdate/selfupdate.go
→
go-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.sh
→
install.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.go
→
release.go
@@ -7,6 +7,7 @@
var ( EMessageRemoteServerAddress = "https://emessage.machinetele.com" EMessageVersionHistory = []string{ + "prerelease.5", "prerelease.4", "prerelease.3", "prerelease.2",