Skip to content

Commit

Permalink
Updates to release builder
Browse files Browse the repository at this point in the history
 * Add all necessary setup / runtime tools
 * Also include docs
 * But exclude development things (pip / tox / gettext scripts)
 * Give output a `-release` suffix to indicate it's not the same as Git...
  • Loading branch information
declension committed Apr 15, 2018
1 parent 3464bd1 commit d9660cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/create_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

# Just like lambda-uploader uses...
output="lambda_function.zip"
includes="squeezealexa/ locale/"

mode=$1
version=${2:-latest}
Expand All @@ -13,10 +14,10 @@ if test "$mode" == "release"; then
extras="--exclude *.pem";
$(dirname $0)/compile-translations
echo -e "\nContinuing with build...\n"
output="squeeze-alexa-$2.zip"
output="squeeze-alexa-release-$2.zip"
includes="$includes metadata/ bin/local_test.py docs/ README.md"
fi


cd "$(dirname $0)/.."
pip --isolated download -r requirements.txt

Expand All @@ -29,7 +30,7 @@ done
# Allow restarting...
rm "$output" 2>/dev/null || true

zip -r $output squeezealexa/ locale/ $deps LICENSE *.py *.pem --exclude '*.pyc' --exclude '*__pycache__/' --exclude '*.po' --exclude '*~' $extras
zip -r $output $includes $deps LICENSE *.py *.pem --exclude '*.pyc' --exclude '*__pycache__/' --exclude '*.po' --exclude '*~' $extras

echo "Cleaning up dependencies..."
for dep in $deps; do
Expand Down

0 comments on commit d9660cb

Please sign in to comment.