Skip to content

Commit 384dccf

Browse files
authored
SNOW-1567724 Update Release Script (#575)
* Update Release Script * reformat
1 parent 9b2468b commit 384dccf

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

deploy.sh

+22-28
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ if [ -z "$GITHUB_TAG_1" ]; then
4444
exit 1
4545
fi
4646

47-
if [ -z "$GITHUB_TAG_2" ]; then
48-
echo "[ERROR] 'GITHUB_TAG_2' is not specified!"
49-
exit 1
50-
fi
51-
52-
if [ -z "$GITHUB_TAG_3" ]; then
53-
echo "[ERROR] 'GITHUB_TAG_3 ' is not specified!"
54-
exit 1
55-
fi
56-
5747
mkdir -p ~/.ivy2
5848

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

100-
echo publishing previous_spark_version branch...
101-
git checkout tags/$GITHUB_TAG_2
102-
if [ "$PUBLISH" = true ]; then
103-
sbt +publishSigned
104-
else
105-
echo "publish to $PUBLISH_S3_URL"
106-
rm -rf ~/.ivy2/local/
107-
sbt +publishLocalSigned
108-
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_2}/ --recursive
90+
if [ -n "$GITHUB_TAG_2" ]; then
91+
echo publishing previous_spark_version branch...
92+
git checkout tags/$GITHUB_TAG_2
93+
if [ "$PUBLISH" = true ]; then
94+
sbt +publishSigned
95+
else
96+
echo "publish to $PUBLISH_S3_URL"
97+
rm -rf ~/.ivy2/local/
98+
sbt +publishLocalSigned
99+
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_2}/ --recursive
100+
fi
109101
fi
110102

111-
echo publishing previous_spark_version branch...
112-
git checkout tags/$GITHUB_TAG_3
113-
if [ "$PUBLISH" = true ]; then
114-
sbt +publishSigned
115-
else
116-
echo "publish to $PUBLISH_S3_URL"
117-
rm -rf ~/.ivy2/local/
118-
sbt +publishLocalSigned
119-
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_3}/ --recursive
103+
if [ -n "$GITHUB_TAG_3" ]; then
104+
echo publishing previous_spark_version branch...
105+
git checkout tags/$GITHUB_TAG_3
106+
if [ "$PUBLISH" = true ]; then
107+
sbt +publishSigned
108+
else
109+
echo "publish to $PUBLISH_S3_URL"
110+
rm -rf ~/.ivy2/local/
111+
sbt +publishLocalSigned
112+
aws s3 cp ~/.ivy2/local ${PUBLISH_S3_URL}/${GITHUB_TAG_3}/ --recursive
113+
fi
120114
fi

0 commit comments

Comments
 (0)