-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): add prep-release script
The Flux release process will now require a preparation step. This still will make and commit any changes to the source code, i.e. updating docs to mark the correct version a function was introduced. The process will be: 1. Run ./prep-release.sh in Flux repo 2. Merge created PR 3. Run IDPE release script (which calls the Flux release script) The Flux release script checks that the prep step was completed so it can't be easily forgotten.
- Loading branch information
1 parent
ee44519
commit 64ff6ee
Showing
9 changed files
with
98 additions
and
9 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
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,30 @@ | ||
#!/bin/bash | ||
|
||
# This script's purpose is to check that any needed changes to the source | ||
# have been made prerelease. | ||
# | ||
# For example we check that all instances of 'introduced: NEXT' in the docs | ||
# have been replaced with a version instead. | ||
|
||
# Make sure we are at the repo root | ||
DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)/.. | ||
cd $DIR | ||
|
||
EXIT=0 | ||
while read f | ||
do | ||
# Check for any introduced: NEXT comments that still exist | ||
grep "^//[[:space:]]*introduced:[[:space:]]\+NEXT[[:space:]]*$" $f > /dev/null | ||
ret=$? | ||
if [ $ret -eq 0 ] | ||
then | ||
EXIT=1 | ||
echo "$f contains 'introduced: NEXT'" | ||
fi | ||
done < <(find ./stdlib -name '*.flux') | ||
|
||
if [ $EXIT -ne 0 ] | ||
then | ||
echo "Flux not prepared for release. Run ./prep_release.sh to start the release preparation process." | ||
fi | ||
exit $EXIT |
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,14 @@ | ||
#!/bin/bash | ||
|
||
# Make sure we are at the repo root | ||
DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd) | ||
cd $DIR/.. | ||
|
||
# Version is the first and only arg, remove the 'v' prefix. | ||
version=${1//v/} | ||
|
||
while read f | ||
do | ||
# Replace any introduced: NEXT comment with the actual version | ||
sed -i "s/^\/\/[[:space:]]*introduced:[[:space:]]\+NEXT[[:space:]]*$/\/\/ introduced: $version/g" $f | ||
done < <(find ./stdlib -name '*.flux') |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "flux" | ||
version = "0.5.1" | ||
authors = ["jlapacik <[email protected]>"] | ||
version = "0.154.0" | ||
authors = ["Flux Team <[email protected]>"] | ||
edition = "2021" | ||
|
||
[lib] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# Run this script to prepare a Flux release | ||
# | ||
# This script is responsible for creating a commit that finalizes any changes | ||
# to the source that need to be made before a release. | ||
# | ||
# The following optional dependencies are helpful if available. | ||
# | ||
# - `hub`, which will submit PRs for the update branches automatically if | ||
# available. | ||
|
||
DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd) | ||
cd $DIR | ||
|
||
set -e | ||
|
||
version=$(./gotool.sh github.com/influxdata/changelog nextver) | ||
|
||
git checkout -b prep-release/$version | ||
|
||
./etc/fixup_docs_version.sh $version | ||
|
||
message="build(flux): prepare Flux release for $version" | ||
|
||
git commit -am "$message" | ||
|
||
if ! command -v hub &> /dev/null | ||
then | ||
echo "hub is not installed. Cannot open github PRs automatically." | ||
echo "Pull requests will have to be manually created." | ||
HAS_HUB=0 | ||
else | ||
HAS_HUB=1 | ||
fi | ||
|
||
if [ $HAS_HUB -eq 1 ] | ||
then | ||
hub pull-request -m "$message" -r influxdata/flux-team | ||
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