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 e6ddaab commit 7dacd50
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 60 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 $uncompyle6_owd
git checkout $branch && pyenv local $PYTHON_VERSION && git pull
rc=$?
return $rc
}
28 changes: 8 additions & 20 deletions admin-tools/setup-master.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
#!/bin/bash
# Check out master branch and dependent development master branches
PYTHON_VERSION=3.8.18
PYTHON_VERSION=3.8

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 $?
}

owd=$(pwd)

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

mydir=$(dirname $bs)
uncompyle6_owd=$(pwd)
cd $mydir
. ./checkout_common.sh
fulldir=$(readlink -f $mydir)
cd $fulldir/..
(cd $fulldir/.. && checkout_version python-spark && checkout_version python-xdis &&
checkout_version python-uncompyle6)

git pull
rm -v */.python-version || true
cd $owd
(cd $fulldir/.. && \
setup_version python-spark master && \
setup_version python-xdis python-3.6 )
checkout_finish master
26 changes: 6 additions & 20 deletions admin-tools/setup-python-3.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,13 @@ if [[ $0 == $bs ]] ; then
exit 1
fi

# FIXME put some of the below in a common routine
function checkout_version {
local repo=$1
version=${2:-python-3.0-to-3.2}
echo Checking out $version on $repo ...
(cd ../$repo && git checkout $version && pyenv local $PYTHON_VERSION) && \
git pull
return $?
}

owd=$(pwd)
trap finish EXIT

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

mydir=$(dirname $bs)
. ./checkout_common.sh
fulldir=$(readlink -f $mydir)
cd $fulldir
cd $fulldir/..
(cd $fulldir/.. && checkout_version python-spark master && checkout_version python-xdis &&
checkout_version python-uncompyle6)
(cd $fulldir/.. && \
setup_version python-spark master && \
checkout_version python-xdis python-3.0)

git pull
rm -v */.python-version || true
cd $owd
checkout_finish python-3.0-to-3.2
25 changes: 5 additions & 20 deletions admin-tools/setup-python-3.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,12 @@ if [[ $0 == $bs ]] ; then
exit 1
fi

# FIXME put some of the below in a common routine
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

mydir=$(dirname $bs)
. ./checkout_common.sh
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
(cd $fulldir/.. && \
setup_version python-spark master && \
setup_version python-xdis python-3.3 )

git pull
rm -v */.python-version || true
cd $owd
checkout_finish python-3.3-to-3.5

0 comments on commit 7dacd50

Please sign in to comment.