Skip to content

Commit

Permalink
SNOW-1567724 Update Release Script (#575)
Browse files Browse the repository at this point in the history
* Update Release Script

* reformat
  • Loading branch information
sfc-gh-bli authored Jul 31, 2024
1 parent 9b2468b commit 384dccf
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ if [ -z "$GITHUB_TAG_1" ]; then
exit 1
fi

if [ -z "$GITHUB_TAG_2" ]; then
echo "[ERROR] 'GITHUB_TAG_2' is not specified!"
exit 1
fi

if [ -z "$GITHUB_TAG_3" ]; then
echo "[ERROR] 'GITHUB_TAG_3 ' is not specified!"
exit 1
fi

mkdir -p ~/.ivy2

STR=$'realm=Sonatype Nexus Repository Manager
Expand Down Expand Up @@ -97,24 +87,28 @@ else
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_1}/ --recursive
fi

echo publishing previous_spark_version branch...
git checkout tags/$GITHUB_TAG_2
if [ "$PUBLISH" = true ]; then
sbt +publishSigned
else
echo "publish to $PUBLISH_S3_URL"
rm -rf ~/.ivy2/local/
sbt +publishLocalSigned
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_2}/ --recursive
if [ -n "$GITHUB_TAG_2" ]; then
echo publishing previous_spark_version branch...
git checkout tags/$GITHUB_TAG_2
if [ "$PUBLISH" = true ]; then
sbt +publishSigned
else
echo "publish to $PUBLISH_S3_URL"
rm -rf ~/.ivy2/local/
sbt +publishLocalSigned
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_2}/ --recursive
fi
fi

echo publishing previous_spark_version branch...
git checkout tags/$GITHUB_TAG_3
if [ "$PUBLISH" = true ]; then
sbt +publishSigned
else
echo "publish to $PUBLISH_S3_URL"
rm -rf ~/.ivy2/local/
sbt +publishLocalSigned
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_3}/ --recursive
if [ -n "$GITHUB_TAG_3" ]; then
echo publishing previous_spark_version branch...
git checkout tags/$GITHUB_TAG_3
if [ "$PUBLISH" = true ]; then
sbt +publishSigned
else
echo "publish to $PUBLISH_S3_URL"
rm -rf ~/.ivy2/local/
sbt +publishLocalSigned
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_3}/ --recursive
fi
fi

0 comments on commit 384dccf

Please sign in to comment.