From 20cbd87b619243b5a7fee7f90caddfbdcebe19e6 Mon Sep 17 00:00:00 2001 From: Firelight Flagboy Date: Wed, 6 Mar 2024 11:33:06 +0100 Subject: [PATCH] Update docker build script to use unique version generated from releaser.py --- server/packaging/server/build.sh | 6 +----- server/packaging/testbed-server/build.sh | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/server/packaging/server/build.sh b/server/packaging/server/build.sh index e1dbeaeaaed..361b68e9810 100644 --- a/server/packaging/server/build.sh +++ b/server/packaging/server/build.sh @@ -9,11 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")} # Allow the user to overwrite `ROOTDIR` by exporting it beforehand. ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")} -CURRENT_DATE=$(date --iso-8601) -CURRENT_VERSION=$(grep -o '^version = .*$' $ROOTDIR/server/pyproject.toml | sed 's/version = "\(.*\)"$/\1/' | tr '+' '.') -CURRENT_COMMIT_SHA=$(git rev-parse --short HEAD) - -UNIQ_TAG="$CURRENT_DATE-$CURRENT_VERSION-$CURRENT_COMMIT_SHA" +UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/full=\(.*\)$/\1/p' | tr '+' '.') # We use Github package repository to store our docker's container. PREFIX=ghcr.io/scille/parsec-cloud IMAGE_NAME=parsec-server diff --git a/server/packaging/testbed-server/build.sh b/server/packaging/testbed-server/build.sh index 58461dc0e3f..7923d1df5e2 100755 --- a/server/packaging/testbed-server/build.sh +++ b/server/packaging/testbed-server/build.sh @@ -9,11 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")} # Allow the user to overwrite `ROOTDIR` by exporting it beforehand. ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")} -CURRENT_DATE=$(date --iso-8601) -CURRENT_VERSION=$(grep -o '^version = .*$' $ROOTDIR/server/pyproject.toml | sed 's/version = "\(.*\)"$/\1/' | tr '+' '-' ) -CURRENT_COMMIT_SHA=$(git rev-parse --short HEAD) - -UNIQ_TAG="$CURRENT_VERSION.$CURRENT_DATE-sha.$CURRENT_COMMIT_SHA" +UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/full=\(.*\)$/\1/p' | tr '+' '.') # We use Github package repository to store our docker's container. PREFIX=ghcr.io/scille/parsec-cloud