From f9d11d161868e0eb93643aa27e9ddfda97984275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20S=C3=BCberkr=C3=BCb?= Date: Mon, 4 Mar 2024 20:48:36 +0100 Subject: [PATCH] Update script to package OOPSLA24 artifact --- scripts/package_artifact.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/package_artifact.sh b/scripts/package_artifact.sh index 9eed018..11fa827 100755 --- a/scripts/package_artifact.sh +++ b/scripts/package_artifact.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash + +set -o pipefail -o errexit -o nounset + test -e xfunc_artifact.zip && rm xfunc_artifact.zip -GIT_URL="$(git remote get-url origin)" +SOURCE_GIT_URL="https://github.com/polarity-lang/oopsla24" +VSCODE_GIT_URL="https://github.com/polarity-lang/vscode" DIR=$(mktemp -d) -git clone --depth 1 "$GIT_URL" "$DIR/source-code" +git clone --depth 1 "$SOURCE_GIT_URL" "$DIR/source-code" pushd "$DIR" || exit 1 pushd "$DIR/source-code" || exit 1 @@ -24,25 +28,24 @@ rm -rf .cargo/ popd -git clone --depth 1 "$GIT_URL" "$DIR/build-vscode-ext" +git clone --depth 1 "$VSCODE_GIT_URL" "$DIR/build-vscode-ext" pushd "$DIR/build-vscode-ext" || exit 1 -cd ext/vscode npm install vsce package --allow-missing-repository popd mkdir -p polarity-lang -cp "$DIR/build-vscode-ext/ext/vscode/polarity-0.0.1.vsix" "polarity-lang/polarity-0.0.1.vsix" +cp "$DIR/build-vscode-ext/polarity-0.0.1.vsix" "polarity-lang/polarity-0.0.1.vsix" mv source-code polarity-lang -zip -r 129.zip polarity-lang +zip -r polarity-lang.zip polarity-lang popd -mv "$DIR/129.zip" . +mv "$DIR/polarity-lang.zip" . rm -rf "$DIR" echo "SHA256 checksum:" -sha256sum 129.zip +sha256sum polarity-lang.zip