Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ strip_virtualenv () {
echo "venv original size $(du -sh $VIRTUAL_ENV | cut -f1)"
find $VIRTUAL_ENV/lib64/python2.7/site-packages/ -name "*.so" | xargs strip
echo "venv stripped size $(du -sh $VIRTUAL_ENV | cut -f1)"

pushd $VIRTUAL_ENV/lib64/python2.7/site-packages/ && zip -r -9 -q /outputs/venv.zip * ; popd
echo "site-packages compressed size $(du -sh /outputs/venv.zip | cut -f1)"

pushd $VIRTUAL_ENV && zip -r -q /outputs/full-venv.zip * ; popd
echo "venv compressed size $(du -sh /outputs/full-venv.zip | cut -f1)"
pushd $VIRTUAL_ENV/lib64/python2.7/site-packages/
mkdir ../outputs
zip -r -9 -q ../outputs/venv.zip *
popd
echo "site-packages compressed size $(du -sh $VIRTUAL_ENV/lib64/python2.7/outputs/venv.zip | cut -f1)"
cp $VIRTUAL_ENV/lib64/python2.7/outputs/venv.zip .
}

shared_libs () {
Expand Down
19 changes: 19 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 0.1

phases:
install:
commands:
- echo Nothing to do in the install phase...
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on `date`
- bash build.sh
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- venv.zip