diff --git a/admin-tools/check-2.4-2.7-versions.sh b/admin-tools/check-2.4-2.7-versions.sh index ad7e1591..5be7fef7 100755 --- a/admin-tools/check-2.4-2.7-versions.sh +++ b/admin-tools/check-2.4-2.7-versions.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Run tests over all Python versions in branch python-2.4-2.7 +set -e function finish { cd $owd } @@ -10,7 +12,7 @@ if ! source ./pyenv-2.4-2.7-versions ; then exit $? fi if ! source ./setup-python-2.4.sh ; then - exit $? + exit $rc fi cd .. @@ -20,9 +22,9 @@ for version in $PYVERSIONS; do exit $? fi make clean && python setup.py develop - if ! make check-short ; then + if ! make check ; then exit $? fi echo === $version === done -make check +finish 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 100755 --- 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..a2f87ece 100644 --- 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 } +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 && 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 78b92b3b..5b9430b9 100644 --- a/admin-tools/setup-python-2.4.sh +++ b/admin-tools/setup-python-2.4.sh @@ -1,24 +1,37 @@ #!/bin/bash +# Check out python-2.4-to-2.7 and dependent development branches. + +set -e PYTHON_VERSION=2.4.6 -function checkout_version { - local repo=$1 - version=${2:-python-2.4-to-2.7} - echo Checking out $version.4 on $repo ... - (cd ../$repo && git checkout $version && pyenv local $PYTHON_VERSION) && \ - git pull - return $? -} - -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 + +function checkout_version { + local repo=$1 + 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 $? +} + +function finish { + cd $owd +} +owd=$(pwd) +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) -cd $owd + 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 27282d53..5e61da11 100644 --- a/admin-tools/setup-python-3.0.sh +++ b/admin-tools/setup-python-3.0.sh @@ -1,6 +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 { @@ -15,21 +23,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) -cd $owd -rm -v */.python-version || true -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 4e244df3..e51fc7f3 100644 --- a/admin-tools/setup-python-3.3.sh +++ b/admin-tools/setup-python-3.3.sh @@ -1,6 +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 { @@ -15,21 +22,18 @@ 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) -cd $owd + 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