-
Notifications
You must be signed in to change notification settings - Fork 178
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
chore: Define check in release process ensuring migration guide is defined in a major version #2171
Changes from 2 commits
22cfb52
a5477ea
78753ba
d23f710
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
: "${1?"Tag of new release must be provided"}" | ||
|
||
RELEASE_TAG=$1 | ||
RELEASE_NUMBER=$(echo "${RELEASE_TAG}" | tr -d v) | ||
|
||
IFS='.' read -r MAJOR MINOR PATCH <<< "$RELEASE_NUMBER" | ||
|
||
# Check if it's a major release (patch version is 0) | ||
if [ "$PATCH" -eq 0 ]; then | ||
UPGRADE_GUIDE_PATH="website/docs/guides/$MAJOR.$MINOR.$PATCH-upgrade-guide.html.markdown" | ||
echo "Checking for the presence of $UPGRADE_GUIDE_PATH" | ||
if [ ! -f "$UPGRADE_GUIDE_PATH" ]; then | ||
echo "Stopping release process, upgrade guide $UPGRADE_GUIDE_PATH does not exist. Please visit our releasing documentation for more details." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we add the link or do you think it's not necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preferred to keep it more generic so the reference does not breaking moving forward, but no strong opinion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could add a link to the RELEASE.md instead of the exact section |
||
exit 1 | ||
else | ||
echo "Upgrade guide $UPGRADE_GUIDE_PATH exists." | ||
fi | ||
else | ||
echo "No upgrade guide needed." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
knit: similary to validate-inputs i don't know if it would be better to have an update job with both references in doc and changelog header. or maybe it's better as it is now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the commits are being done by calling an external workflow we do not have the possibility of having both in a single job