diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/upload-release.sh | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/scripts/upload-release.sh b/scripts/upload-release.sh deleted file mode 100755 index 618e823..0000000 --- a/scripts/upload-release.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# Script to create a psycopg release -# -# You must create a release tag before running the script, e.g. 2_5_4. -# The script will check out in a clear environment, build the sdist package, -# unpack and test it, then upload on PyPI and on the psycopg website. - -set -e - -REPO_URL=git@github.com:psycopg/psycopg2.git - -VER=$(grep ^PSYCOPG_VERSION setup.py | cut -d "'" -f 2) - -# avoid releasing a testing version -echo "$VER" | grep -qE '^[0-9]+\.[0-9]+(\.[0-9]+)?$' \ - || (echo "bad release: $VER" >&2 && exit 1) - -# Check out in a clean environment -rm -rf rel -mkdir rel -cd rel -git clone $REPO_URL psycopg -cd psycopg -TAG=${VER//./_} -git checkout -b $TAG $TAG -make sdist - -# Test the sdist just created -cd dist -tar xzvf psycopg2-$VER.tar.gz -cd psycopg2-$VER -make -make check -cd ../../ - -read -p "if you are not fine with the above stop me now..." - -# upload to pypi and to the website - -python setup.py sdist --formats=gztar upload -s - -DASHVER=${VER//./-} -DASHVER=${DASHVER:0:3} - -# Requires ssh configuration for 'psycoweb' -scp dist/psycopg2-${VER}.tar.gz psycoweb:tarballs/PSYCOPG-${DASHVER}/ -ssh psycoweb ln -sfv PSYCOPG-${DASHVER}/psycopg2-${VER}.tar.gz \ - tarballs/psycopg2-latest.tar.gz - -scp dist/psycopg2-${VER}.tar.gz.asc psycoweb:tarballs/PSYCOPG-${DASHVER}/ -ssh psycoweb ln -sfv PSYCOPG-${DASHVER}/psycopg2-${VER}.tar.gz.asc \ - tarballs/psycopg2-latest.tar.gz.asc - -echo "great, now write release notes and an email!" |
