Skip to content

Instantly share code, notes, and snippets.

@gemmadlou
Created December 18, 2019 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gemmadlou/87298685e83702a3d0cc9d02e612ada9 to your computer and use it in GitHub Desktop.
Save gemmadlou/87298685e83702a3d0cc9d02e612ada9 to your computer and use it in GitHub Desktop.
Simple artefact creation script
# Simple deploy script for this project
# 1. Zips project. 2. Deploys to S3. It doesn't delete or remove packages.
if ["$1" = ""]; then
echo "$(basename -- $0) <VERSION> Semver (v1.0.0)"
exit;
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ARTEFACT_NAME="project-name"
BUCKET_NAME="s3-bucket-name"
cd $DIR
rm ../$ARTEFACT_NAME.zip
(zip -r9 ../$ARTEFACT_NAME.zip . -x \*.git\* \*migration\* \*coverage\* \*tests\* \*__tests__\*)
aws s3 cp ../$ARTEFACT_NAME.zip s3://$BUCKET_NAME/$ARTEFACT_NAME/$1/app.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment