Skip to content

Commit

Permalink
Update script to package OOPSLA24 artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
timsueberkrueb committed Mar 4, 2024
1 parent df240b6 commit f9d11d1
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts/package_artifact.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit f9d11d1

Please sign in to comment.