Skip to content

Commit 6c40685

Browse files
authored
Sync Java worflows: Allow re-running prepare release branch workflow (#156)
1 parent 548f297 commit 6c40685

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/prepare-release-branch.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ jobs:
2626
- prereqs
2727
steps:
2828
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
# history is needed to allow fast-forward push below in case
31+
# re-running this workflow after merging additional PRs to main
32+
fetch-depth: 0
2933

3034
- name: Create release branch
3135
run: |
3236
version=$(.github/scripts/get-version.sh)
3337
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
3438
release_branch_name="release/v${version}"
35-
release_branch_exists=$(git ls-remote --heads origin refs/heads/$release_branch_name)
36-
if [[ $release_branch_exists != "" ]] ; then
37-
echo "release branch $release_branch_name already exists"
38-
exit 1
39-
fi
4039
else
4140
echo "unexpected version: $version"
4241
exit 1

0 commit comments

Comments
 (0)