Restructure client build-state check to match the build block

Nest the prebuilt/hash-check branches inside `if [ $SKIP_CLIENT_BUILD
-eq 0 ]` so the shape mirrors the subsequent build-or-install block.
Per Nicola's review.
This commit is contained in:
Dannon Baker
2026-04-17 14:53:24 -04:00
parent 693486432a
commit da911d0cf3
+18 -16
View File
@@ -216,27 +216,29 @@ if [ $FETCH_WHEELS -eq 1 ]; then
fi
# Check client build state.
if [ "$SKIP_CLIENT_BUILD" -ne 0 ]; then
echo "The Galaxy client build is being skipped due to the SKIP_CLIENT_BUILD environment variable."
elif [ "$INSTALL_PREBUILT_CLIENT" -ne 0 ]; then
echo "The Galaxy prebuilt client will be installed from PyPI."
elif [ -f static/client_build_hash.txt ]; then
# If git is not used and static/client_build_hash.txt is present, next
# client rebuilds must be done manually by the admin
if [ "$GIT_BRANCH" = "0" ]; then
echo "Skipping Galaxy client build because git is not in use and the client build state cannot be compared against local changes. If you have made local modifications, then manual client builds will be required. See ./client/README.md for more information."
SKIP_CLIENT_BUILD=1
else
# Check if anything has changed in client/ or visualization plugins since the last build
if git diff --quiet "$(cat static/client_build_hash.txt)" -- client/ config/plugins/visualizations/; then
echo "The Galaxy client build is up to date and will not be rebuilt at this time."
if [ "$SKIP_CLIENT_BUILD" -eq 0 ]; then
if [ "$INSTALL_PREBUILT_CLIENT" -ne 0 ]; then
echo "The Galaxy prebuilt client will be installed from PyPI."
elif [ -f static/client_build_hash.txt ]; then
# If git is not used and static/client_build_hash.txt is present, next
# client rebuilds must be done manually by the admin
if [ "$GIT_BRANCH" = "0" ]; then
echo "Skipping Galaxy client build because git is not in use and the client build state cannot be compared against local changes. If you have made local modifications, then manual client builds will be required. See ./client/README.md for more information."
SKIP_CLIENT_BUILD=1
else
echo "The Galaxy client is out of date and will be built now."
# Check if anything has changed in client/ or visualization plugins since the last build
if git diff --quiet "$(cat static/client_build_hash.txt)" -- client/ config/plugins/visualizations/; then
echo "The Galaxy client build is up to date and will not be rebuilt at this time."
SKIP_CLIENT_BUILD=1
else
echo "The Galaxy client is out of date and will be built now."
fi
fi
else
echo "The Galaxy client has not yet been built and will be built now."
fi
else
echo "The Galaxy client has not yet been built and will be built now."
echo "The Galaxy client build is being skipped due to the SKIP_CLIENT_BUILD environment variable."
fi
# Build or install client if necessary.