Skip to content

Commit

Permalink
Administrivia
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Jul 22, 2024
1 parent 9f025f3 commit 8454b23
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 50 deletions.
21 changes: 21 additions & 0 deletions admin-tools/checkout_common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Common checkout routine
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
bs=${BASH_SOURCE[0]}
mydir=$(dirname $bs)
fulldir=$(readlink -f $mydir)

function setup_version {
local repo=$1
version=$2
echo Running setup $version on $repo ...
(cd ../$repo && . ./admin-tools/setup-${version}.sh)
return $?
}

function checkout_finish {
branch=$1
cd $xpython_owd
git checkout $branch && pyenv local $PYTHON_VERSION && git pull
rc=$?
return $rc
}
3 changes: 3 additions & 0 deletions admin-tools/merge-for-2.7.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#/bin/bash
# Setup for running Python 2.7, merging Python 3.1-to-3.2 into this branch
xpython_27_owd=$(pwd)
cd $(dirname ${BASH_SOURCE[0]})
if . ./setup-python-2.7.sh; then
git merge python-3.1-to-3.2
fi
cd $xpython_27_owd
3 changes: 3 additions & 0 deletions admin-tools/merge-for-3.1.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#/bin/bash
# Setup for running Python 3.1 .. 3.33, merging Python 3.3-to-3.5 into this branch
xpython_31_owd=$(pwd)
cd $(dirname ${BASH_SOURCE[0]})
if . ./setup-python-3.1.sh; then
git merge python-3.3-to-3.5
fi
cd $xpython_31_owd
3 changes: 3 additions & 0 deletions admin-tools/merge-for-3.3.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#/bin/bash
# Setup for running Python 3.3 .. 3.5, merging Python 3.6-to-3.10 into this branch
xpython_33_owd=$(pwd)
cd $(dirname ${BASH_SOURCE[0]})
if . ./setup-python-3.3.sh; then
git merge master
fi
cd $xpython_33_owd
23 changes: 6 additions & 17 deletions admin-tools/setup-master.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
#!/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}
echo Checking out $version on $repo ...
(cd ../$repo && git checkout $version && pyenv local $PYTHON_VERSION) && \
git pull
return $?
}

export PATH=$HOME/.pyenv/bin/pyenv:$PATH
PYTHON_VERSION=3.8

xpython_owd=$(pwd)
mydir=$(dirname $bs)
fulldir=$(readlink -f $mydir)
(cd $fulldir/.. && checkout_version python-xdis && checkout_version x-python)

rm -v */.python-version >/dev/null 2>&1 || true
cd $owd
cd $mydir
. ./checkout_common.sh
(cd $fulldir/.. && setup_version python-xdis master)
checkout_finish master
12 changes: 6 additions & 6 deletions admin-tools/setup-python-2.7.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
PYTHON_VERSION=2.7.18
# Check out python-2.7 and dependent development branches.
pyenv local $PYTHON_VERSION

owd=$(pwd)
Expand All @@ -8,10 +8,10 @@ if [[ $0 == $bs ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi

PYTHON_VERSION=2.7.18

mydir=$(dirname $bs)
fulldir=$(readlink -f $mydir)
cd $fulldir/..
(cd ../python-xdis/admin-tools && . ./setup-python-2.4.sh && git pull)
git checkout python-2.4-to-2.7
rm -v */.python-version >/dev/null 2>&1 || true
cd $owd
(cd $fulldir/.. && checkout_version python-xdis python-2.4)
checkout_finish python-2.4-to-2.7
17 changes: 9 additions & 8 deletions admin-tools/setup-python-3.1.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash
PYTHON_VERSION=3.2.6
pyenv local $PYTHON_VERSION
# Check out python-3.1-to-3.2 and dependent development branches.

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

PYTHON_VERSION=3.2

xpython_owd=$(pwd)
mydir=$(dirname $bs)
fulldir=$(readlink -f $mydir)
cd $fulldir/..
(cd ../python-xdis && . ./admin-tools/setup-python-3.0.sh && git pull)
git checkout python-3.1-to-3.2
rm -v */.python-version >/dev/null 2>&1 || true
cd $owd
cd $mydir
. ./checkout_common.sh
(cd $fulldir/.. && checkout_version python-xdis python-3.0)
checkout_finish python-3.1-to-3.2
25 changes: 6 additions & 19 deletions admin-tools/setup-python-3.3.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
#!/bin/bash
# Check out python-3.3-to-3.5 and dependent development branches.

PYTHON_VERSION=3.3.7

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-3.3-to-3.5}
echo Checking out $version on $repo ...
(cd ../$repo && git checkout $version && pyenv local $PYTHON_VERSION) && \
git pull
return $?
}

owd=$(pwd)

export PATH=$HOME/.pyenv/bin/pyenv:$PATH
PYTHON_VERSION=3.3.7

xpython_owd=$(pwd)
mydir=$(dirname $bs)
fulldir=$(readlink -f $mydir)
cd $fulldir/..
(cd $fulldir/.. && checkout_version python-xdis python-3.3-to-3.5 && checkout_version x-python)

rm -v */.python-version || true
cd $owd
cd $mydir
. ./checkout_common.sh
(cd $fulldir/.. && checkout_version python-xdis python-3.3)
checkout_finish python-3.3-to-3.5

0 comments on commit 8454b23

Please sign in to comment.