@@ -42,12 +42,12 @@ if [ "$VARIANT" = "SNAPSHOT" ]; then
42
42
git checkout -b $branch_name
43
43
${script_dir} /update_sdk_version.sh $REL_VERSION
44
44
git clean -xdf
45
- git commit -s -m " Update master version to ${$ REL_VERSION } " -a
45
+ git commit -s -m " Update master version to ${REL_VERSION} " -a
46
46
git push origin $branch_name
47
47
gh pr create --repo ${GITHUB_REPOSITORY} \
48
48
--base master \
49
- --title " Update master version to ${$ REL_VERSION } " \
50
- --body " Update master version to ${$ REL_VERSION } "
49
+ --title " Update master version to ${REL_VERSION} " \
50
+ --body " Update master version to ${REL_VERSION} "
51
51
echo " Done."
52
52
exit 0
53
53
elif [ " $VARIANT " = " rc" ]; then
84
84
echo " $RELEASE_BRANCH branch is ready."
85
85
86
86
if [ ` git rev-parse --verify $RELEASE_TAG 2> /dev/null` ]; then
87
- echo " $RELEASE_TAG tag already exists, aborting ..."
88
- exit 2
89
- fi
90
-
91
- ${script_dir} /update_sdk_version.sh $REL_VERSION
92
- git commit -s -m " Release $REL_VERSION " -a
93
- if [ " $VARIANT " = " " ]; then
94
- echo " Generating docs ..."
95
- ${script_dir} /update_docs.sh $REL_VERSION
96
- git commit -s -m " Generate updated javadocs for $REL_VERSION " -a
97
- fi
98
- git push origin $RELEASE_BRANCH
87
+ echo " $RELEASE_TAG tag already exists, checking it out ..."
88
+ git checkout $RELEASE_TAG
89
+ else
90
+ ${script_dir} /update_sdk_version.sh $REL_VERSION
91
+ git commit -s -m " Release $REL_VERSION " -a
92
+ if [ " $VARIANT " = " " ]; then
93
+ echo " Generating docs ..."
94
+ ${script_dir} /update_docs.sh $REL_VERSION
95
+ git commit -s -m " Generate updated javadocs for $REL_VERSION " -a
96
+ fi
97
+ git push origin $RELEASE_BRANCH
99
98
100
- echo " Tagging $RELEASE_TAG ..."
101
- git tag $RELEASE_TAG
102
- echo " $RELEASE_TAG is tagged."
99
+ echo " Tagging $RELEASE_TAG ..."
100
+ git tag $RELEASE_TAG
101
+ echo " $RELEASE_TAG is tagged."
103
102
104
- echo " Pushing $RELEASE_TAG tag ..."
105
- git push origin $RELEASE_TAG
106
- echo " $RELEASE_TAG tag is pushed."
103
+ echo " Pushing $RELEASE_TAG tag ..."
104
+ git push origin $RELEASE_TAG
105
+ echo " $RELEASE_TAG tag is pushed."
106
+ fi
107
107
108
108
if [ " $VARIANT " = " " ]; then
109
109
git clean -xdf
110
110
echo " Creating pull request to update docs ..."
111
111
branch_name=" automation/update_docs_${current_time} "
112
112
git reset --hard origin/master
113
- git cherry-pick $RELEASE_TAG
113
+ git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
114
114
git push origin $branch_name
115
115
gh pr create --repo ${GITHUB_REPOSITORY} \
116
116
--base master \
117
- --title " Update master docs for ${$ REL_VERSION } release" \
118
- --body " Update master docs for ${$ REL_VERSION } release"
117
+ --title " Update master docs for ${REL_VERSION} release" \
118
+ --body " Update master docs for ${REL_VERSION} release"
119
119
fi
120
120
121
121
echo " Done."
0 commit comments