Skip to content

Commit 2b55da7

Browse files
committed
testing process
Signed-off-by: Jordan Dubrick <[email protected]>
1 parent 0785e46 commit 2b55da7

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

make-release.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ FIRST_DIGIT="${SCHEMA_VERSION%%.*}"
2828
RELEASE_BRANCH="release-v${FIRST_DIGIT}"
2929
DEVFILE_REPO="[email protected]:devfile/registry-operator.git"
3030
## This will be uncommented for actual devfile repo
31-
RELEASE_UPSTREAM_NAME="devfile-upstream-release"
31+
#RELEASE_UPSTREAM_NAME="devfile-upstream-release"
3232
# This goes to my origin for testing
33-
#RELEASE_UPSTREAM_NAME="origin"
33+
RELEASE_UPSTREAM_NAME="origin"
3434

3535
if ! command -v hub > /dev/null; then
3636
echo "[ERROR] The hub CLI needs to be installed. See https://github.com/github/hub/releases"
@@ -72,11 +72,11 @@ checkoutToReleaseBranch() {
7272
echo "[INFO] Checking out to $SCHEMA_VERSION branch."
7373
if git ls-remote -q --heads | grep -q $SCHEMA_VERSION ; then
7474
echo "[INFO] $SCHEMA_VERSION exists."
75-
#resetChanges $SCHEMA_VERSION --- commented out so it doesnt delete my work when testing
75+
resetChanges $SCHEMA_VERSION --- commented out so it doesnt delete my work when testing
7676
else
7777
echo "[INFO] $SCHEMA_VERSION does not exist. Will create a new one from main."
78-
#resetChanges main --- commented out so it doesnt delete my work when testing
79-
git push origin main:$SCHEMA_VERSION
78+
resetChanges release-automation --- commented out so it doesnt delete my work when testing #change release-automation to main after testing
79+
git push origin release-automation:$SCHEMA_VERSION
8080
fi
8181
git checkout -B $SCHEMA_VERSION
8282
}
@@ -117,18 +117,18 @@ commitChanges() {
117117
# with the name release-vX
118118
## This func will be used when we have a new major release and there is no branch in the upstream repo
119119
createNewReleaseBranch(){
120-
git checkout -b "${RELEASE_BRANCH}" main
120+
git checkout -b "${RELEASE_BRANCH}" release-automation #change to main after testing
121121
git push "${RELEASE_UPSTREAM_NAME}" "${RELEASE_BRANCH}"
122-
#hub sync -- this supposedly will create that branch in upstream
123122
}
124123

124+
# Checks if release-vX branch is in the upstream
125+
# If it is not it creates the new major release branch based off main
125126
verifyReleaseBranch() {
126127
if git ls-remote --exit-code --heads ${RELEASE_UPSTREAM_NAME} "$RELEASE_BRANCH" >/dev/null 2>&1; then
127128
echo "Branch $RELEASE_BRANCH exists in the upstream repository."
128129
else
129130
echo "Branch $RELEASE_BRANCH does not exist in the upstream repository."
130131
createNewReleaseBranch
131-
132132
fi
133133
}
134134

@@ -138,14 +138,14 @@ createPullRequest(){
138138
}
139139

140140
main(){
141-
# checkoutToReleaseBranch
142-
# updateVersionNumbers
143-
# exportEnvironmentVariables
144-
# make bundle
145-
# commitChanges "chore(release): release version ${SCHEMA_VERSION}"
146-
#createPullRequest "v${SCHEMA_VERSION} Release"
147-
# Check if the branch exists in the remote repository
141+
checkoutToReleaseBranch
142+
updateVersionNumbers
143+
exportEnvironmentVariables
144+
make bundle
145+
commitChanges "chore(release): release version ${SCHEMA_VERSION}"
148146
verifyReleaseBranch
147+
createPullRequest "v${SCHEMA_VERSION} Release"
148+
149149
#setUpstream -- LEAVE COMMENTED AS THIS WILL SET MY ORIGIN TO DEVFILE
150150
}
151151

0 commit comments

Comments
 (0)