[tool] Fix current branch selector in unreleased scripts

The current listing and sorting method gives 'zed' as result instead of
the real actual development cycle name. This patch replaces this
with using the default cycle name from openstack_releases.

Change-Id: I89e7ac2a0e13f0d2a2450be2554748bb9a7c5f0c
This commit is contained in:
Előd Illés
2025-02-17 08:46:11 +01:00
parent 674e26a392
commit 4bdb755b0e
2 changed files with 12 additions and 10 deletions

View File

@ -9,11 +9,6 @@ if [[ $# -gt 1 ]]; then
fi
BRANCH=${1:-master}
if [ "$BRANCH" = "master" ]; then
SERIES=$(ls -1 deliverables | sort | tail -n 1)
else
SERIES=$(basename $BRANCH)
fi
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR=$(dirname $TOOLSDIR)
@ -31,6 +26,12 @@ if [[ -z "$VIRTUAL_ENV" ]]; then
source $BASEDIR/.tox/venv/bin/activate
fi
if [ "$BRANCH" = "master" ]; then
SERIES=$(python -c 'from openstack_releases import defaults; print(defaults.RELEASE)')
else
SERIES=$(basename $BRANCH)
fi
echo "Finding $SERIES library repositories..."
repos=$(list-deliverables --repos --type client-library --series $SERIES)

View File

@ -9,11 +9,6 @@ if [[ $# -gt 1 ]]; then
fi
BRANCH=${1:-master}
if [ "$BRANCH" = "master" ]; then
SERIES=$(ls -1 deliverables | sort | tail -n 1)
else
SERIES=$(basename $BRANCH)
fi
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR=$(dirname $TOOLSDIR)
@ -31,6 +26,12 @@ if [[ -z "$VIRTUAL_ENV" ]]; then
source $BASEDIR/.tox/venv/bin/activate
fi
if [ "$BRANCH" = "master" ]; then
SERIES=$(python -c 'from openstack_releases import defaults; print(defaults.RELEASE)')
else
SERIES=$(basename $BRANCH)
fi
echo "Finding $SERIES library repositories..."
repos=$(list-deliverables --repos --type library --series $SERIES)