diff --git a/admin-tools/check-2.4-2.7-versions.sh b/admin-tools/check-2.4-2.7-versions.sh index 2e3fe1bb..df4649f5 100755 --- a/admin-tools/check-2.4-2.7-versions.sh +++ b/admin-tools/check-2.4-2.7-versions.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Run tests over all Python versions in branch python-2.4-2.7 set -e function finish { cd $owd @@ -11,7 +12,9 @@ if ! source ./pyenv-2.4-2.7-versions ; then exit $? fi if ! source ./setup-python-2.4.sh ; then - exit $? + rc=$? + finish + exit $rc fi cd .. @@ -22,6 +25,8 @@ for version in $PYVERSIONS; do fi make clean && python setup.py develop if ! make check ; then + finish + rc=$? exit $? fi echo === $version === diff --git a/admin-tools/check-3.3-3.5-versions.sh b/admin-tools/check-3.3-3.5-versions.sh index 5b451577..99fb08fa 100644 --- a/admin-tools/check-3.3-3.5-versions.sh +++ b/admin-tools/check-3.3-3.5-versions.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Run tests over all Python versions in branch python-3.3-3.5 +set -e function finish { cd $owd } @@ -25,3 +27,4 @@ for version in $PYVERSIONS; do fi echo === $version === done +finish diff --git a/admin-tools/setup-master.sh b/admin-tools/setup-master.sh index 706e81fd..bd4e4ee8 100755 --- a/admin-tools/setup-master.sh +++ b/admin-tools/setup-master.sh @@ -1,6 +1,14 @@ #!/bin/bash +# Check out master branch and dependent development master branches +set -e PYTHON_VERSION=3.8.18 +bs=${BASH_SOURCE[0]} +if [[ $0 == $bs ]] ; then + echo "This script should be *sourced* rather than run directly through bash" + exit 1 +fi + function checkout_version { local repo=$1 version=${2:-master} @@ -14,18 +22,17 @@ function checkout_version { function finish { cd $owd } - -export PATH=$HOME/.pyenv/bin/pyenv:$PATH owd=$(pwd) -bs=${BASH_SOURCE[0]} -if [[ $0 == $bs ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi +trap finish EXIT + +export PATH=$HOME/.pyenv/bin/pyenv:$PATHb + mydir=$(dirname $bs) fulldir=$(readlink -f $mydir) cd $fulldir/.. (cd $fulldir/.. && checkout_version python-spark && checkout_version python-xdis && - checkout_version python-uncompyle6) -cd $owd -rm -v */.python-version >/dev/null 2>&1 || true + checkout_version python-uncompyle6) + +git pull +rm -v */.python-version || true +finish diff --git a/admin-tools/setup-python-2.4.sh b/admin-tools/setup-python-2.4.sh index 2f56cba1..5b9430b9 100755 --- a/admin-tools/setup-python-2.4.sh +++ b/admin-tools/setup-python-2.4.sh @@ -1,10 +1,19 @@ #!/bin/bash +# Check out python-2.4-to-2.7 and dependent development branches. + +set -e PYTHON_VERSION=2.4.6 +bs=${BASH_SOURCE[0]} +if [[ $0 == $bs ]] ; then + echo "This script should be *sourced* rather than run directly through bash" + exit 1 +fi + function checkout_version { local repo=$1 - version=${2:-python-2.4} - echo Checking out $version.4 on $repo ... + version=${2:-python-2.4-to-2.7} + echo Checking out $version on $repo ... (cd ../$repo && git checkout $version && pyenv local $PYTHON_VERSION) && \ git pull return $? @@ -13,16 +22,16 @@ function checkout_version { function finish { cd $owd } - owd=$(pwd) -bs=${BASH_SOURCE[0]} -if [[ $0 == $bs ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi +trap finish EXIT + +export PATH=$HOME/.pyenv/bin/pyenv:$PATH + mydir=$(dirname $bs) fulldir=$(readlink -f $mydir) (cd $fulldir/.. && checkout_version python-spark && checkout_version python-xdis python-2.4-to-2.7 && - checkout_version python-uncompyle6) + checkout_version python-uncompyle6) + +git pull rm -v */.python-version || true finish diff --git a/admin-tools/setup-python-3.0.sh b/admin-tools/setup-python-3.0.sh index 8a2cfaf5..5e61da11 100644 --- a/admin-tools/setup-python-3.0.sh +++ b/admin-tools/setup-python-3.0.sh @@ -1,7 +1,14 @@ #!/bin/bash +# Check out python-3.0-to-3.2 and dependent development branches. + set -e PYTHON_VERSION=3.0.1 -pyenv local $PYTHON_VERSION + +bs=${BASH_SOURCE[0]} +if [[ $0 == $bs ]] ; then + echo "This script should be *sourced* rather than run directly through bash" + exit 1 +fi # FIXME put some of the below in a common routine function checkout_version { @@ -16,14 +23,10 @@ function checkout_version { function finish { cd $owd } +owd=$(pwd) +trap finish EXIT export PATH=$HOME/.pyenv/bin/pyenv:$PATH -owd=$(pwd) -bs=${BASH_SOURCE[0]} -if [[ $0 == $bs ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi mydir=$(dirname $bs) fulldir=$(readlink -f $mydir) @@ -31,6 +34,6 @@ cd $fulldir/.. (cd $fulldir/.. && checkout_version python-spark master && checkout_version python-xdis && checkout_version python-uncompyle6) -git checkout python-3.0-to-3.2 && git pull && pyenv local $PYTHON_VERSION +git pull rm -v */.python-version || true finish diff --git a/admin-tools/setup-python-3.3.sh b/admin-tools/setup-python-3.3.sh index 5125c31b..821ca59a 100755 --- a/admin-tools/setup-python-3.3.sh +++ b/admin-tools/setup-python-3.3.sh @@ -1,7 +1,13 @@ #!/bin/bash +# Check out python-3.3-to-3.5 and dependent development branches. set -e PYTHON_VERSION=3.3.7 -pyenv local $PYTHON_VERSION + +bs=${BASH_SOURCE[0]} +if [[ $0 == $bs ]] ; then + echo "This script should be *sourced* rather than run directly through bash" + exit 1 +fi # FIXME put some of the below in a common routine function checkout_version { @@ -16,22 +22,17 @@ function checkout_version { function finish { cd $owd } +owd=$(pwd) +trap finish EXIT export PATH=$HOME/.pyenv/bin/pyenv:$PATH -owd=$(pwd) -bs=${BASH_SOURCE[0]} -if [[ $0 == $bs ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi -mydir=$(dirname $bs) fulldir=$(readlink -f $mydir) cd $fulldir/.. (cd $fulldir/.. && checkout_version python-spark master && checkout_version python-xdis && checkout_version python-uncompyle6) rm -v */.python-version || true -git checkout python-3.3-to-3.5 && git pull && pyenv local $PYTHON_VERSION +git pull rm -v */.python-version || true finish