forked from coder/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify packaging and improve scripts
Much better test now as well.
- Loading branch information
Showing
13 changed files
with
100 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
** | ||
!release-github | ||
!release-packages | ||
!ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ dist* | |
out* | ||
release/ | ||
release-static/ | ||
release-github/ | ||
release-packages/ | ||
release-gcp/ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Packages code-server for the current OS and architecture into ./release-packages. | ||
# This script assumes that a static release is built already into ./release-static. | ||
|
||
main() { | ||
cd "$(dirname "${0}")/../.." | ||
source ./ci/lib.sh | ||
|
||
export VERSION | ||
VERSION="$(pkg_json_version)" | ||
|
||
local OS | ||
OS="$(os)" | ||
|
||
export ARCH | ||
ARCH="$(arch)" | ||
|
||
local archive_name="code-server-$VERSION-$OS-$ARCH" | ||
mkdir -p release-packages | ||
|
||
local ext | ||
if [[ $OS == "linux" ]]; then | ||
ext=".tar.gz" | ||
tar -czf "release-packages/$archive_name$ext" --transform "s/^\.\/release-static/$archive_name/" ./release-static | ||
else | ||
mv ./release-static "./$archive_name" | ||
ext=".zip" | ||
zip -r "release-packages/$archive_name$ext" "./$archive_name" | ||
mv "./$archive_name" ./release-static | ||
fi | ||
|
||
echo "done (release-packages/$archive_name)" | ||
|
||
release_gcp | ||
|
||
if [[ $OSTYPE == linux* ]]; then | ||
release_nfpm | ||
fi | ||
} | ||
|
||
release_gcp() { | ||
mkdir -p "release-gcp/$VERSION" | ||
cp "release-packages/$archive_name$ext" "./release-gcp/$VERSION/$OS-$ARCH$ext" | ||
mkdir -p "release-gcp/latest" | ||
cp "./release-packages/$archive_name$ext" "./release-gcp/latest/$OS-$ARCH$ext" | ||
} | ||
|
||
# Generates deb and rpm packages. | ||
release_nfpm() { | ||
local nfpm_config | ||
nfpm_config=$(envsubst < ./ci/build/nfpm.yaml) | ||
|
||
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.deb" | ||
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.rpm" | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters