diff --git a/.github/maven-publish-utils.sh b/.github/maven-publish-utils.sh index a4ece2e06e..d66f6de8c9 100755 --- a/.github/maven-publish-utils.sh +++ b/.github/maven-publish-utils.sh @@ -4,6 +4,10 @@ set -e +# Flag to disable commit mapping functionality +# Set to "true" to disable commit mapping operations +DISABLE_COMMIT_MAPPING="${DISABLE_COMMIT_MAPPING:-true}" + # Function to execute curl commands with retry and error handling execute_curl_with_retry() { local url="$1" @@ -111,6 +115,11 @@ update_version_metadata() { local commit_id="$3" local snapshot_repo_url="${4:-$SNAPSHOT_REPO_URL}" + if [ "$DISABLE_COMMIT_MAPPING" = "true" ]; then + echo "Skipping version metadata update (commit mapping disabled)" + return 0 + fi + echo "Updating version metadata for ${artifact_id} version ${version} with commit ID ${commit_id}" TEMP_DIR=$(mktemp -d) @@ -204,6 +213,11 @@ update_commit_mapping() { local commit_map_filename="${5:-$COMMIT_MAP_FILENAME}" local snapshot_repo_url="${6:-$SNAPSHOT_REPO_URL}" + if [ "$DISABLE_COMMIT_MAPPING" = "true" ]; then + echo "Skipping commit-version mapping update (commit mapping disabled)" + return 0 + fi + echo "Updating commit-version mapping for ${artifact_id}" # Create temp directory for work