Created
December 18, 2019 07:13
-
-
Save gemmadlou/87298685e83702a3d0cc9d02e612ada9 to your computer and use it in GitHub Desktop.
Simple artefact creation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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