diff --git a/.gitignore b/.gitignore index 1284fce..4edf933 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ __pycache__/ /build/ /dist/ /*.egg +/.eggs /MANIFEST /README.html /pypi-server-standalone.py diff --git a/bin/commit-standalone.sh b/bin/commit-standalone.sh index c8b06ba..c883917 100755 --- a/bin/commit-standalone.sh +++ b/bin/commit-standalone.sh @@ -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 diff --git a/bin/gen-standalone.sh b/bin/gen-standalone.sh index 0526a41..2545eda 100755 --- a/bin/gen-standalone.sh +++ b/bin/gen-standalone.sh @@ -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