Skip to content

Commit fcdb788

Browse files
authored
disable commit-history uploading to maven (opensearch-project#4088)
Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent 4a3b03a commit fcdb788

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/maven-publish-utils.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
set -e
66

7+
# Flag to disable commit mapping functionality
8+
# Set to "true" to disable commit mapping operations
9+
DISABLE_COMMIT_MAPPING="${DISABLE_COMMIT_MAPPING:-true}"
10+
711
# Function to execute curl commands with retry and error handling
812
execute_curl_with_retry() {
913
local url="$1"
@@ -111,6 +115,11 @@ update_version_metadata() {
111115
local commit_id="$3"
112116
local snapshot_repo_url="${4:-$SNAPSHOT_REPO_URL}"
113117

118+
if [ "$DISABLE_COMMIT_MAPPING" = "true" ]; then
119+
echo "Skipping version metadata update (commit mapping disabled)"
120+
return 0
121+
fi
122+
114123
echo "Updating version metadata for ${artifact_id} version ${version} with commit ID ${commit_id}"
115124

116125
TEMP_DIR=$(mktemp -d)
@@ -204,6 +213,11 @@ update_commit_mapping() {
204213
local commit_map_filename="${5:-$COMMIT_MAP_FILENAME}"
205214
local snapshot_repo_url="${6:-$SNAPSHOT_REPO_URL}"
206215

216+
if [ "$DISABLE_COMMIT_MAPPING" = "true" ]; then
217+
echo "Skipping commit-version mapping update (commit mapping disabled)"
218+
return 0
219+
fi
220+
207221
echo "Updating commit-version mapping for ${artifact_id}"
208222

209223
# Create temp directory for work

0 commit comments

Comments
 (0)