Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream create-release-branch.sh to use correct branch #61

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions openshift/release/create-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ set -e # Exit immediately on error.

release=$1

# Set upstream release without "v" prefix. e.g. release-v1.11 => release-1.11
upstream_release=release-"${release#"release-v"}"

# Fetch the latest upstream and checkout the new branch.
git fetch upstream ${release}
git checkout upstream/${release}
git fetch upstream "${upstream_release}"
git checkout upstream/"${upstream_release}"

# Copy the openshift extra files from the OPENSHIFT/main branch.
git fetch openshift main
git checkout openshift/main -- openshift OWNERS
git add openshift OWNERS
git commit -m "Add openshift specific files."

# Drop the release-suffix and add the micro version with '0'.
# e.g. release-1.9 => 1.9.0
VERSION=${release#"release-"}.0

openshift/release/download_release_artifacts.sh ${VERSION}
openshift/release/download_release_artifacts.sh "${release}"
git add .
git commit -am ":fire: Generate artifacts."

# TODO: currently this script is executed manually. So, do not push by the script automatically.
echo "
Now ready to create a new branch. Push it by:

$ git checkout -b ${release}
$ git push openshift ${release}

"
Loading