forked from influxdata/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prep-release.sh
executable file
·40 lines (30 loc) · 933 Bytes
/
prep-release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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