From 360a9a2a3ba81900e411f713321fdccdfc716c37 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Tue, 30 May 2023 14:40:04 +0200 Subject: [PATCH 1/4] disable pushing autoupdate file on s3 for testing purposes also set prerelease: true for the github release, so that we can perform tests --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54c3b70fb..791d03d41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -572,7 +572,7 @@ jobs: release_name: ${{ github.ref }} body: ${{ steps.release_body.outputs.RBODY}} draft: false - prerelease: ${{ needs.build.outputs.prerelease }} + prerelease: true - name: Upload release files on Github uses: svenstaro/upload-release-action@v2 @@ -586,8 +586,8 @@ jobs: run: aws s3 sync release/ s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }} if: ${{ needs.build.outputs.prerelease != 'true' }} - - name: Update version file (used by frontend to trigger autoupdate and create filename) - run: | - echo {\"Version\": \"${GITHUB_REF##*/}\"} > /tmp/agent-version.json - aws s3 cp /tmp/agent-version.json s3://${{ env.VERSION_TARGET }} - if: ${{ needs.build.outputs.prerelease != 'true' }} + # - name: Update version file (used by frontend to trigger autoupdate and create filename) + # run: | + # echo {\"Version\": \"${GITHUB_REF##*/}\"} > /tmp/agent-version.json + # aws s3 cp /tmp/agent-version.json s3://${{ env.VERSION_TARGET }} + # if: ${{ needs.build.outputs.prerelease != 'true' }} From d6afe487323622dee2c7780fc697ddd69996fc58 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Fri, 9 Jun 2023 12:55:05 +0200 Subject: [PATCH 2/4] we check if the bundle is already there --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index e37410c4a..9f021af27 100755 --- a/main.go +++ b/main.go @@ -453,7 +453,7 @@ func oldInstallExists() bool { if binIsOld { return false } - return oldAgentPath.Exist() + return oldAgentPath.Join("ArduinoCreateAgent.app").Exist() } // printDialog will print a GUI error dialog on macos From 58ee77a791ec02a9a7b763cd0756c7d84a4df58f Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Fri, 9 Jun 2023 12:55:38 +0200 Subject: [PATCH 3/4] fix typo --- updater/updater_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/updater_darwin.go b/updater/updater_darwin.go index f0bc6e5ed..ec00f88cc 100644 --- a/updater/updater_darwin.go +++ b/updater/updater_darwin.go @@ -59,7 +59,7 @@ func checkForUpdates(currentVersion string, updateURL string, cmdName string) (s if currentAppPath.Ext() != ".app" { return "", fmt.Errorf("could not find app root in %s", executablePath) } - oldAppPath := currentAppPath.Parent().Join("ArdiunoCreateAgent.old.app") + oldAppPath := currentAppPath.Parent().Join("ArduinoCreateAgent.old.app") if oldAppPath.Exist() { return "", fmt.Errorf("temp app already exists: %s, cannot update", oldAppPath) } From 12f5e275c886b113c7072f76f00f8d592c6b8b8f Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Tue, 6 Jun 2023 12:36:17 +0200 Subject: [PATCH 4/4] Revert "disable pushing autoupdate file on s3 for testing purposes" This reverts commit 61373da56030a458f4a820152753e99453bbed72. --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 791d03d41..54c3b70fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -572,7 +572,7 @@ jobs: release_name: ${{ github.ref }} body: ${{ steps.release_body.outputs.RBODY}} draft: false - prerelease: true + prerelease: ${{ needs.build.outputs.prerelease }} - name: Upload release files on Github uses: svenstaro/upload-release-action@v2 @@ -586,8 +586,8 @@ jobs: run: aws s3 sync release/ s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }} if: ${{ needs.build.outputs.prerelease != 'true' }} - # - name: Update version file (used by frontend to trigger autoupdate and create filename) - # run: | - # echo {\"Version\": \"${GITHUB_REF##*/}\"} > /tmp/agent-version.json - # aws s3 cp /tmp/agent-version.json s3://${{ env.VERSION_TARGET }} - # if: ${{ needs.build.outputs.prerelease != 'true' }} + - name: Update version file (used by frontend to trigger autoupdate and create filename) + run: | + echo {\"Version\": \"${GITHUB_REF##*/}\"} > /tmp/agent-version.json + aws s3 cp /tmp/agent-version.json s3://${{ env.VERSION_TARGET }} + if: ${{ needs.build.outputs.prerelease != 'true' }}