From e2789608b2a7d2262ea3f5aaf299264cc66e650f Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 3 Jun 2020 14:18:12 -0400 Subject: [PATCH] Fix autoupdates for Darwin --- ci/README.md | 1 + ci/build/build-packages.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ci/README.md b/ci/README.md index 01e8a56a..9624988b 100644 --- a/ci/README.md +++ b/ci/README.md @@ -35,6 +35,7 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) 10. Wait for the npm package to be published. 11. Update the homebrew package. - Send a pull request to [homebrew-core](https://github.com/Homebrew/homebrew-core) with the URL in the [formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/code-server.rb) updated. +12. Make sure to add a release without the `v` prefix for autoupdate from `3.2.0`. ## dev diff --git a/ci/build/build-packages.sh b/ci/build/build-packages.sh index 716af699..8149289c 100755 --- a/ci/build/build-packages.sh +++ b/ci/build/build-packages.sh @@ -30,9 +30,16 @@ release_archive() { local release_name="code-server-$VERSION-$OS-$ARCH" if [[ $OS == "linux" ]]; then tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone + elif [[ $OS == "macos" && $ARCH == "x86_64" ]]; then + # Just exists to make autoupdating from 3.2.0 work again. + mv ./release-standalone "./$release_name" + zip -r "release-packages/$release_name.zip" "./$release_name" + mv "./$release_name" ./release-standalone + return else tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone fi + echo "done (release-packages/$release_name)" release_gcp