FIX gen-standalone script & make it fail on errors.

This commit is contained in:
Kostis Anagnostopoulos 2015-09-17 12:22:31 +02:00
parent c21a0ae2ab
commit 189deb367b
3 changed files with 10 additions and 2 deletions

1
.gitignore vendored

@ -18,6 +18,7 @@ __pycache__/
/build/
/dist/
/*.egg
/.eggs
/MANIFEST
/README.html
/pypi-server-standalone.py

@ -15,6 +15,12 @@ if [ ! -x "$git_wdir" ]; then
chmod a+x "$git_wdir"
fi
## Ensure `standalone` branch exists (fails in travis).
git fetch pypiserver standalone:pypiserver/standalone -f && \
git branch --track standalone pypiserver/standalone
set -o errexit
gitversion=$(git describe --tags)
rm -rf .standalone
if nwd_dump=$( "$git_wdir" . .standalone standalone 2>&1 ); then

@ -2,6 +2,8 @@
##
## Create an executable zip file.
set -o errexit
exec_zip="./pypi-server-standalone.py"
my_dir="$(dirname "$0")"
@ -17,12 +19,11 @@ wheel="./dist/pypiserver-*.whl"
# prepend it with a python-flashbang + some header-comments >= 10-lines
# so that ``head pypiserver*.py``behaves politely.
#
1.6.5-py2.py3-none-any.whl
unzip -jo $wheel pypiserver/__main__.py -d ./dist
zip -d $wheel pypiserver/__main__.py
zip -mj $wheel ./dist/__main__.py
wget https://pypi.python.org/packages/2.7/p/passlib/passlib-1.6.5-py2.py3-none-any.whl#md5=03de8f28697eaa67835758a60386c9fa \
-O dist/passlib-1.6.5-py2.py3-none-any.whl
-O ./dist/passlib-1.6.5-py2.py3-none-any.whl
zip -mj $wheel ./dist/passlib-*.whl
gitversion=$(git describe --tags)
cat - $wheel > "$exec_zip" << EOF