Skip to content

Rewrite the update logic to download and replace the app bundle #737

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

Closed
2 tasks done
umbynos opened this issue Nov 24, 2022 · 1 comment · Fixed by #767 or #768
Closed
2 tasks done

Rewrite the update logic to download and replace the app bundle #737

umbynos opened this issue Nov 24, 2022 · 1 comment · Fixed by #767 or #768
Assignees
Labels
conclusion: resolved Issue was resolved os: macos Specific to macOS operating system topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@umbynos
Copy link
Contributor

umbynos commented Nov 24, 2022

Rewrite the update logic (inside the GO executable) for macOS. This new logic will:

  1. download the zipped bundle inside an OS temporary folder
  2. unpack it inside an OS temporary folder
  3. rename the current bundle to ArduinoCreateAgent-old.app
  4. copy the new bundle from the temporary folder into the Applications folder
  5. run the new agent (that has just been copied)
  6. trash or delete ArduinoCreateAgent-old.app
  7. exit the old executable (that now is running in memory only)

This is dependent from:

@umbynos umbynos added os: macos Specific to macOS operating system topic: code Related to content of the project itself type: enhancement Proposed improvement labels Nov 24, 2022
@umbynos umbynos added this to the MacOS Ventura Support milestone Nov 24, 2022
@umbynos umbynos self-assigned this Dec 5, 2022
@umbynos umbynos assigned cmaglie and unassigned umbynos Jan 19, 2023
@umbynos
Copy link
Contributor Author

umbynos commented Jan 25, 2023

If something goes wrong (eg not enough permissions) there should be a rollback procedure to restore the previous situation.

@umbynos umbynos linked a pull request Feb 13, 2023 that will close this issue
2 tasks
@per1234 per1234 added the conclusion: resolved Issue was resolved label Feb 14, 2023
@umbynos umbynos linked a pull request Feb 15, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved os: macos Specific to macOS operating system topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
3 participants