File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -102,23 +102,30 @@ commitChanges() {
102
102
# with the name release-vX
103
103
# # This func will be used when we have a new major release and there is no branch in the upstream repo
104
104
createNewReleaseBranch (){
105
- git checkout -b " ${RELEASE_BRANCH} "
105
+ git checkout -b " ${RELEASE_BRANCH} " main
106
106
git push origin " ${RELEASE_BRANCH} "
107
- hub sync
107
+ # hub sync
108
108
}
109
109
110
110
createPullRequest (){
111
111
echo " [INFO] Creating a PR"
112
- hub pull-request --base ${RELEASE_BRANCH} --head ${SCHEMA_VERSION} -m " $1 "
112
+ hub pull-request --base jdubrick: ${RELEASE_BRANCH} --head ${SCHEMA_VERSION} -m " $1 "
113
113
}
114
114
115
115
main (){
116
- checkoutToReleaseBranch
117
- updateVersionNumbers
118
- exportEnvironmentVariables
119
- make bundle
120
- commitChanges " chore(release): release version ${SCHEMA_VERSION} "
121
- createPullRequest " v${SCHEMA_VERSION} Release"
116
+ # checkoutToReleaseBranch
117
+ # updateVersionNumbers
118
+ # exportEnvironmentVariables
119
+ # make bundle
120
+ # commitChanges "chore(release): release version ${SCHEMA_VERSION}"
121
+ # createPullRequest "v${SCHEMA_VERSION} Release"
122
+ # Check if the branch exists in the remote repository
123
+ if git ls-remote --exit-code --heads origin " $RELEASE_BRANCH " > /dev/null 2>&1 ; then
124
+ echo " Branch $RELEASE_BRANCH exists in the remote repository."
125
+ else
126
+ echo " Branch $RELEASE_BRANCH does not exist in the remote repository."
127
+ createNewReleaseBranch
128
+ fi
122
129
}
123
130
124
131
main
You can’t perform that action at this time.
0 commit comments