babashka/.circleci/script/release

38 lines
750 B
Text
Raw Permalink Normal View History

2019-08-09 12:51:42 +00:00
#!/usr/bin/env bash
rm -rf /tmp/release
mkdir -p /tmp/release
cp bb /tmp/release
2019-08-09 12:51:42 +00:00
VERSION=$(cat resources/BABASHKA_VERSION)
2019-08-09 12:51:42 +00:00
## release binary as tar.gz archive
2019-08-09 12:51:42 +00:00
2021-03-15 16:21:17 +00:00
arch=${BABASHKA_ARCH:-amd64}
2021-03-15 15:56:32 +00:00
2021-04-09 15:40:01 +00:00
if [ "$BABASHKA_STATIC" = "true" ]; then
arch="$arch-static"
fi
# because circle won't allow the same file to be saved/restored in the same workspace concurrently
cp metabom.jar "/tmp/release/$BABASHKA_PLATFORM-$arch-metabom.jar"
cd /tmp/release
mkdir -p /tmp/bb_size
./bb '(spit "/tmp/bb_size/size" (.length (io/file "bb")))'
archive="babashka-$VERSION-$BABASHKA_PLATFORM-$arch.tar.gz"
tar zcvf "$archive" bb # bbk
cd -
./bb --config .build/bb.edn --deps-root . release-artifact "/tmp/release/$archive"
2019-08-09 12:51:42 +00:00
## cleanup
2021-04-21 11:46:47 +00:00
cd /tmp/release
2019-12-13 17:13:35 +00:00
rm bb # bbk