-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And fix all the linting errors it now reports. This is a backwards incompatible change in our API, unfortunately. Also upgrade to the new GitHub CLI-based release management approach that Beat Link Trigger now uses.
- Loading branch information
Showing
10 changed files
with
157 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:construction: This is pre-release code for people who want to help test [what is going into the next release](https://github.com/Deep-Symmetry/crate-digger/blob/master/CHANGELOG.md). | ||
|
||
> Don’t download this if you aren’t comfortable testing code while it is under active development! Instead, look at the [latest release](https:///github.com/Deep-Symmetry/crate-digger/releases/latest). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## What’s in the Release | ||
|
||
✨Summary to be added once James has a moment! Please see the [Change Log](https://github.com/Deep-Symmetry/crate-digger/blob/main/CHANGELOG.md#LINK-GOES-HERE) for all the details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit if any command fails. | ||
|
||
# See if we are creating a preview release | ||
if [ "$release_snapshot" = true ] ; then | ||
|
||
# Create (or move) the latest-preview tag locally, then push it. | ||
echo "Creating tag for preview release" | ||
git config --global user.name 'James Elliott' | ||
git config --global user.email '[email protected]' | ||
git tag latest-preview -m "The latest preview release" --force | ||
git push --tags | ||
|
||
# Actually create the preview release and upload the cross-platform Jar | ||
echo "Creating preview release" | ||
gh release create latest-preview "$artifact_name#Library Jar" --prerelease \ | ||
--title "Preview release being built" \ | ||
--notes ":construction: This release is currently being built by GitHub Actions. Come back in a few minutes." | ||
|
||
else | ||
|
||
# Actually create the release and upload the cross-platform Jar | ||
echo "Creating final release" | ||
gh release create "$release_tag" "$artifact_name#Library Jar" --prerelease \ | ||
--title "Release being built" \ | ||
--notes ":construction: This release is currently being built by GitHub Actions. Come back in a few minutes." | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit if any command fails. | ||
|
||
# Check if the preview release exists. | ||
if gh release view latest-preview --json assets --jq '.assets[].name' > preview_assets.txt ; then | ||
|
||
echo "There is a preview release. Deleting assets..." | ||
while read -r asset; do | ||
echo " Deleting asset $asset:" | ||
gh release delete-asset latest-preview "$asset" --yes | ||
done <preview_assets.txt | ||
|
||
echo "Deleting the preview release itself:" | ||
gh release delete latest-preview --cleanup-tag --yes | ||
|
||
else | ||
echo "No preview release found to clean up." | ||
fi | ||
|
||
rm -f preview_assets.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit if any command fails. | ||
|
||
# See if we are creating a preview release | ||
if [ "$release_snapshot" = true ] ; then | ||
|
||
# Update the release information on GitHub and reflect that it is ready. | ||
gh release edit latest-preview --title "$release_tag preview" --notes-file .github/resources/preview_notes.md | ||
|
||
else | ||
|
||
# Look for the heading in the change log corresponding to this version | ||
pattern="^## \\[${git_version//\./\\.}\\]" | ||
if grep "$pattern" CHANGELOG.md >_header.md ; then | ||
|
||
# Extract the release date from that heading so we can build a link to the release notes. | ||
rel_date=`sed 's/.* - //' <_header.md` | ||
link="#${git_version//\./}---$rel_date" | ||
|
||
# Update the release note template to use the correct link | ||
sed "s/#LINK-GOES-HERE/$link/" .github/resources/release_notes.md > _release_notes.md | ||
|
||
else | ||
|
||
# Log a workflow warning reporting that this release could not be found in the change log. | ||
echo "::warning file=CHANGELOG.md,title=Unable to link from release notes.::No heading for release $git_version found" | ||
|
||
# Update the release note template to link to the top of the file | ||
sed "s/#LINK-GOES-HERE//" .github/resources/release_notes.md > _release_notes.md | ||
|
||
fi | ||
|
||
# Update the release information on GitHub and reflect that it is ready. | ||
gh release edit "$release_tag" --prerelease=false --latest --title "$release_tag" --notes-file _release_notes.md | ||
|
||
# Clean up our temporary files | ||
rm -f _header.md | ||
rm -f _release_notes.md | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters