From 3c1b0f5b90f05b415e33a6eb94d007f0422f1024 Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Mon, 29 Nov 2021 22:08:46 -0800 Subject: [PATCH] Remove restriction from publish snapshot script that jars must end in -SNAPSHOT.jar. Signed-off-by: Marc Handalian --- publish/publish-snapshot.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/publish/publish-snapshot.sh b/publish/publish-snapshot.sh index 65ca67bd62..e2f4526e28 100755 --- a/publish/publish-snapshot.sh +++ b/publish/publish-snapshot.sh @@ -113,11 +113,12 @@ for pom in ${pomFiles}; do pom_dir="$(dirname "${pom}")" for FILE in "${pom_dir}"/*; do # The POM is deployed with the artifact in a single deploy-file command, we can skip over it - if [[ $FILE != $pom ]]; then + if [[ $FILE != $pom ]] && + [[ $FILE != *"test-fixtures"* ]] && # This is a hack to ensure the OpenSearch build-tools test fixture jar is not uploaded instead of the actual build-tools jar. + [[ $FILE != *"javadoc"* ]] && + [[ $FILE != *"sources"* ]]; then extension="${FILE##*.}" case $extension in jar | war | zip) - # Ensure we are only pushing the artifact that ends with -SNAPSHOT. and its pom. - if [[ $FILE == *SNAPSHOT.${extension} ]]; then echo "Uploading: ${FILE} with ${pom} to ${url}" mvn --settings="${mvn_settings}" deploy:deploy-file \ -DgeneratePom=false \ @@ -125,9 +126,6 @@ for pom in ${pomFiles}; do -Durl="${SNAPSHOT_REPO_URL}" \ -DpomFile="${pom}" \ -Dfile="${FILE}" || echo "Failed to upload ${FILE}" - else - echo "Skipping upload of additional artifact: ${FILE}" - fi ;; *) echo "Skipping upload for ${FILE}" ;; esac