Skip to content

Commit

Permalink
add packaging script
Browse files Browse the repository at this point in the history
  • Loading branch information
skingo committed Jan 3, 2024
1 parent 3c565f8 commit 7a34231
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions package_artifact.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
test -e xfunc_artifact.zip && rm xfunc_artifact.zip

DIR=$(mktemp -d)
cp -r ./ $DIR/

rm $DIR/package_artifact.sh

# only keep whitelisted files in oopsla_examples/, then delete whitelist
for file in oopsla_examples/*.xfn; do
grep -q $(basename $file) oopsla_examples/whitelist.txt || rm $DIR/$file
done
rm $DIR/oopsla_examples/whitelist.txt

# remove potential build artifacts
rm -r $DIR/target/

rm -rf $DIR/.git/
rm -rf $DIR/.gitignore
rm -rf $DIR/.github/
rm -rf $DIR/.cargo/

pushd $DIR
zip -r xfunc_artifact.zip .
popd
mv $DIR/xfunc_artifact.zip .
rm -rf $DIR

0 comments on commit 7a34231

Please sign in to comment.