mirror of
https://github.com/YunoHost/yunohost-ci.git
synced 2024-09-03 20:05:53 +02:00
Fix DEFAULT_BRANCH
This commit is contained in:
parent
04c64e185c
commit
e6708f5012
1 changed files with 3 additions and 3 deletions
6
base.sh
6
base.sh
|
@ -15,14 +15,14 @@
|
|||
#CUSTOM_ENV_CI_PROJECT_DIR=/builds/yunohost/yunohost
|
||||
CONTAINER_ID="runner-$CUSTOM_ENV_CI_RUNNER_ID-project-$CUSTOM_ENV_CI_PROJECT_ID-concurrent-$CUSTOM_ENV_CI_CONCURRENT_PROJECT_ID-$CUSTOM_ENV_CI_JOB_ID"
|
||||
ARCH="$(echo $CUSTOM_ENV_CI_RUNNER_EXECUTABLE_ARCH | cut -d'/' -f2)" # linux/amd64
|
||||
DEFAULT_BRANCH=$(echo $CUSTOM_ENV_CI_DEFAULT_BRANCH | cut -d'-' -f1) # stretch-unstable, buster-unstable...
|
||||
DEFAULT_BRANCH="$CUSTOM_ENV_CI_DEFAULT_BRANCH"
|
||||
CURRENT_VERSION=$(echo $CUSTOM_ENV_CI_DEFAULT_BRANCH | cut -d'-' -f2) # stretch-unstable, stretch-testing, stretch-stable...
|
||||
CURRENT_BRANCH="$CUSTOM_ENV_CI_COMMIT_REF_NAME"
|
||||
DEBIAN_VERSION=$(echo $CUSTOM_ENV_CI_COMMIT_REF_NAME | cut -d'-' -f1) # CUSTOM_ENV_CI_COMMIT_REF_NAME is the target branch of the MR: stretch-unstable, buster-unstable...
|
||||
if [ -z "$DEBIAN_VERSION" ] || [ "$DEBIAN_VERSION" != "stretch" ] && [ "$DEBIAN_VERSION" != "buster" ]
|
||||
then
|
||||
echo "Use the default branch $DEFAULT_BRANCH"
|
||||
DEBIAN_VERSION="$DEFAULT_BRANCH"
|
||||
DEBIAN_VERSION="$(echo $CUSTOM_ENV_CI_DEFAULT_BRANCH | cut -d'-' -f1)" # stretch-unstable, buster-unstable...
|
||||
echo "Use the default debian version: $DEBIAN_VERSION"
|
||||
fi
|
||||
SNAPSHOT_NAME="$CUSTOM_ENV_CI_JOB_IMAGE"
|
||||
if [ -z "$SNAPSHOT_NAME" ]
|
||||
|
|
Loading…
Reference in a new issue