Skip to content

Commit

Permalink
Skip fetching existing artifacts (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Aug 1, 2024
1 parent c344c0c commit 4bbc2bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/fetch-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ for i in $(find . -name artifacts.json -mindepth 2); do
ARTIFACT_GROUP=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].group" $i)
ARTIFACT_PATH=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].path" $i)
ARTIFACT_BASEURL="https://nexus.alfresco.com/nexus/repository/${ARTIFACT_REPO}"
ARTIFACT_FINAL_PATH="${ARTIFACT_PATH}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT}"
if [ -f "${ARTIFACT_FINAL_PATH}" ]; then
echo "Artifact $ARTIFACT_NAME-$ARTIFACT_VERSION already downloaded, skipping..."
continue
fi
echo "Downloading $ARTIFACT_GROUP:$ARTIFACT_NAME $ARTIFACT_VERSION from $ARTIFACT_BASEURL"
wget "${ARTIFACT_BASEURL}/${ARTIFACT_GROUP//\./\/}/${ARTIFACT_NAME}/${ARTIFACT_VERSION}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT}" \
-O ${ARTIFACT_PATH}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT} \
-O "${ARTIFACT_FINAL_PATH}" \
--no-verbose
done
done

0 comments on commit 4bbc2bf

Please sign in to comment.