Skip to content

Commit

Permalink
Update docker build script to use unique version generated from relea…
Browse files Browse the repository at this point in the history
…ser.py
  • Loading branch information
FirelightFlagboy committed Mar 6, 2024
1 parent 8edab7d commit 20cbd87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions server/packaging/server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions server/packaging/testbed-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 20cbd87

Please sign in to comment.