shout/scripts/publish

21 lines
554 B
Bash
Executable File

#!/bin/sh
set -eu
NAME="shout"
BECAUSE="$HOME/dev/projects/because.sh"
# Build release
cargo build --release
# Compress
gzip -c target/release/"$NAME" > target/release/"$NAME"-aarch64-apple-darwin.gz
# Upload binary
"$BECAUSE/scripts/upload" put "$NAME/bin/$NAME-aarch64-apple-darwin.gz" target/release/"$NAME"-aarch64-apple-darwin.gz
# Upload install script + landing page
"$BECAUSE/scripts/upload" publish "$NAME"
"$BECAUSE/scripts/upload" put "$NAME/index.html" web/index.html
printf "\nPublished %s to https://because.sh/%s/\n" "$NAME" "$NAME"