Fix process (#10571)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2026-02-28 20:11:26 +05:00
committed by GitHub
parent c3758432bf
commit c1b8e77e16
9 changed files with 153 additions and 45 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# This script allows building and pushing docker images with a custom version tag.
# It can be run interactively or with the --version flag.
VERSION=""
PLATFORM="linux/amd64"
REMAINING_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
--version)
VERSION="$2"
shift 2
;;
--platform)
PLATFORM="$2"
shift 2
;;
*)
REMAINING_ARGS+=("$1")
shift
;;
esac
done
if [ -z "$VERSION" ]; then
read -p "Enter version tag for docker images: " VERSION
fi
if [ -z "$VERSION" ]; then
echo "Error: Version tag is required."
exit 1
fi
export DOCKER_VERSION="$VERSION"
export DOCKER_EXTRA="--platform=$PLATFORM"
echo "Starting docker build and push for version: $DOCKER_VERSION ($PLATFORM)"
# We use 'node common/scripts/install-run-rush.js' to ensure we use the right rush version
node "$(dirname "$0")/install-run-rush.js" docker:build "${REMAINING_ARGS[@]}"
node "$(dirname "$0")/install-run-rush.js" docker:push "${REMAINING_ARGS[@]}"
echo "Docker patch completed for version: $DOCKER_VERSION"