Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
run: |
git show -p
ls -1a "$ARTIFACT_DIRECTORY"
- name: create tag
run: ./scripts/release/create-tag.sh
- name: push to origin
run: ./scripts/release/push-to-origin.sh
- name: create Github release
uses: ncipollo/[email protected]
if: ${{ !inputs.dryRun }}
Expand Down
3 changes: 3 additions & 0 deletions scripts/release/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ update_changelog() (
sed -i "4r /dev/stdin" CHANGELOG.md <<< "$changelog_entry"$'\n'
)

# update metadata files and CHANGELOG
update_go
update_orb
update_gha
update_bitbucket
update_changelog

# commit changes and create tag
git config user.name "LaunchDarklyReleaseBot"
git config user.email "[email protected]"
git add .
git commit -m "Prepare release ${release_tag}"
git tag "${release_tag}"
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ tag_exists() (
git rev-parse "${release_tag}" >/dev/null 2>&1
)

create_tag() (
push_to_origin() (
if tag_exists; then
echo "Tag $release_tag already exists. Aborting."
exit 1
fi

git tag "${release_tag}"
git push origin HEAD
git push origin "${release_tag}"
)

if [[ "$DRY_RUN" == "true" ]]; then
git reset --hard HEAD^
echo "Dry run mode: skipping tag and push"
git tag -d "$release_tag" # defensive
git reset --hard HEAD^ # defensive
echo "Dry run mode: skipping push"
else
create_tag
push_to_origin
fi

Loading