Skip to content

add json to enable autoupdate with the new agent logic #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Feb 8, 2023

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
    - [ ] Tests for the changes have been added (for bug fixes / features)
  • What kind of change does this PR introduce?

CI enhancement, companion of #756

  • What is the current behavior?

Close #757

  • What is the new behavior?

The CI uploads 2 json files to s3 download bucket containing the version and the checksum of the zipped bundle.

  • Does this PR introduce a breaking change?

no

  • Other information:

@umbynos umbynos added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Feb 8, 2023
@umbynos umbynos requested a review from cmaglie February 8, 2023 11:41
@umbynos umbynos self-assigned this Feb 8, 2023
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail
@umbynos
Copy link
Contributor Author

umbynos commented Feb 8, 2023

@cmaglie added also the handling for darwin-arm64 if we ever decide to add it in the future

@umbynos umbynos merged commit 4689647 into fix-(s)ventura-code Feb 9, 2023
@umbynos umbynos deleted the json-macos-autoup branch February 9, 2023 09:06
cmaglie pushed a commit that referenced this pull request Feb 10, 2023
* add json to enable autoupdate with the new agent logic

* binary output of the archive https://unix.stackexchange.com/questions/3675/how-can-i-get-a-base64-encoded-shax-on-the-cli

* workaround to allow darwin-arm64 to autoupdate

* parallelize bundle creation and notarization.
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail
cmaglie pushed a commit that referenced this pull request Feb 13, 2023
* add json to enable autoupdate with the new agent logic

* binary output of the archive https://unix.stackexchange.com/questions/3675/how-can-i-get-a-base64-encoded-shax-on-the-cli

* workaround to allow darwin-arm64 to autoupdate

* parallelize bundle creation and notarization.
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail
cmaglie pushed a commit that referenced this pull request Feb 14, 2023
* add json to enable autoupdate with the new agent logic

* binary output of the archive https://unix.stackexchange.com/questions/3675/how-can-i-get-a-base64-encoded-shax-on-the-cli

* workaround to allow darwin-arm64 to autoupdate

* parallelize bundle creation and notarization.
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail
cmaglie added a commit that referenced this pull request Feb 15, 2023
* Upload the signed bundle to s3 (#756)

* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket

* add json to enable autoupdate with the new agent logic (#759)

* add json to enable autoupdate with the new agent logic

* binary output of the archive https://unix.stackexchange.com/questions/3675/how-can-i-get-a-base64-encoded-shax-on-the-cli

* workaround to allow darwin-arm64 to autoupdate

* parallelize bundle creation and notarization.
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail

* Implemented the autoupdater for MacOS

* Added more logging and fixed upgrade procedure

* Use MacOS openApplicationAtURL syscall to re-run updated app

* Bump minimum required macosx version to 10.15

This is required because the auto-update uses the function

warning: 'openApplicationAtURL:configuration:completionHandler:' is only available on macOS 10.15 or newer [-Wunguarded-availability-new]

* Removed diff-based updates

* Fixed update URL for different update methods

* fix invalid workflow

* Always complete the old auto-upgrade procedure

This is required for clients upgrading from versions <=1.2.7

* Moved the syscall to openApplicationAtURL inside Systray

* Added fallback restart for macosx.

* added some more logging

---------

Co-authored-by: Umberto Baldi <[email protected]>
Co-authored-by: Umberto Baldi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The CI should upload a json with version and checksum to S3, for the new update logic
2 participants