allegro/scripts/release.sh

27 lines
774 B
Bash
Executable file

#!/usr/bin/env bash
# Builds the final versions of the book and then upload the results to various
# locations.
# Move into the root folder.
cd $(dirname $(dirname $0))
# Perform the basic environment checks and setup.
./scripts/setup.sh || exit 1
./scripts/check-env-bucket.sh || exit 1
# Clean up old versions of the file.
rm -f dmoonfire*
# Perform the release process.
npx semantic-release
# Create a tarball of the output files and upload them to S3.
export npm_package_name=$(cat package.json | jq -r .name)
tar -cjf $npm_package_name.tar.bz2 dmoonfire*
s3cmd --access_key=$AWS_ACCESS_KEY_ID --access_token=$AWS_SECRET_ACCESS_KEY
--host=$AWS_ENDPOINT --host-bucket=$AWS_ENDPOINT -P put allegro.tar.bz2 s3://$AWS_BUCKET
# Versions
# 2022-08-11 - Initial version