summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan S. Arnold <ryan.arnold@linaro.org>2015-07-18 13:58:04 -0500
committerRyan S. Arnold <ryan.arnold@linaro.org>2015-07-19 14:17:51 -0500
commit3804187845f34cf566db81ff9d793e9222293114 (patch)
treec072bd859aafbab3cc45be007e57d43a78c0c1e3
parent6efcaeb7fe1e03586836b8492e707b2050bfaf47 (diff)
Add local_int_branch and remote_int_branch in SNAPSHOT mode.
When in SNAPSHOT mode a local integration branch will be created and gcc/LINARO-VERSION will have the YYYY.MM incremented by +1 month, and "~dev" appended to the end. The local snapshot branch gcc/LINARO-VERSION file will have the SPIN number incremented by +1 and "~dev" appended to the end. Change-Id: I96ebad273e105d6822f5bb90b14cf6231121ed31
-rwxr-xr-xtcwg-release.sh42
1 files changed, 35 insertions, 7 deletions
diff --git a/tcwg-release.sh b/tcwg-release.sh
index 9db3e82..431f242 100755
--- a/tcwg-release.sh
+++ b/tcwg-release.sh
@@ -315,14 +315,14 @@ EOF
}
bump_and_dev() {
- local bump_to="$1"
- echo "${bump_to}" > $REL_DIR/git/gcc/LINARO-VERSION
+ local bump_snapshot_to="$1"
+ echo "${bump_snapshot_to}" > $REL_DIR/git/gcc/LINARO-VERSION
pushd $REL_DIR/git 1>/dev/null
git commit -q -a -F- <<EOF
gcc/
* LINARO-VERSION: Bump version number, post release.
EOF
- print_info "${bold}Bumped gcc/LINARO-VERSION to ${bump_to} in $(git rev-parse --abbrev-ref HEAD)"
+ print_info "${bold}Bumped gcc/LINARO-VERSION to ${bump_snapshot_to} in $(git rev-parse --abbrev-ref HEAD)"
popd 1>/dev/null
}
@@ -535,9 +535,35 @@ fi
vstring=$(git show "$track":gcc/BASE-VER)
release=${vstring%.*}-"$DATE"
+# Some things are only necessary when we're in snapshot mode.
if [ "${SNAPSHOT:+set}" = "set" ]; then
- # If SPIN isn't set it'll end up being '1'.
- bump_to="${release}-$(( SPIN + 1 ))~dev"
+ # The snapshot branch only gets the spin number bumped.
+ bump_snapshot_to="${release}-$(( SPIN + 1 ))~dev"
+
+ # The local integration branch only gets its DATE bumped. Ask `date` to
+ # figure out what the next month is. Use mid-month as a starting point to
+ # allow `date` to compute with accuracy.
+ bump_int_date="$(date -d "$(date -d "${DATE//./-}-15" +%Y-%m-%d) +1 month" +%Y.%m)"
+
+ # For next month on the integration branch there is no SPIN number.
+ bump_int_to="${vstring%.*}-${bump_int_date}~dev"
+
+ # Due to a change in the GCC branch naming policy, all new GCC releases
+ # start with a single digit release.
+ if [ ${vstring%%.*} -ge "5" ]; then
+ int_vstring=${vstring%%.*}
+ else
+ # The 4.[1-9] branches have the .[digit] in the branch name.
+ int_vstring=${vstring%.*}
+ fi
+
+ # This is the local branch where we bump the gcc/LINARO-VERSION to indicate
+ # the next month. We don't need ~dev in the local int branch name.
+ local_int_branch="snapshots/gcc-${int_vstring}-integration-branch-${bump_int_to%\~dev}"
+
+ # At the end of the script it will recommend that changes to the
+ # local_int_branch will be pushed to the remote_int_branch.
+ remote_int_branch="remotes/${REMOTE}/linaro-local/gcc-${int_vstring}-integration-branch"
fi
# The local branch can have the SPIN number on the name.
@@ -578,7 +604,9 @@ print_info "${bold}The ${RELEASE:+release}${SNAPSHOT:+snapshot}${CANDIDATE:+rele
print_info "${bold}The local branch should be pushed to ${red}${remote_branch}"
print_info "${bold}This local branch will track ${BRANCH:+branch }${TAG:+tag }${red}${track}"
if [ "${SNAPSHOT:+set}" = "set" ]; then
- print_info "${bold}After we've created the snapshot we'll bump the gcc/LINARO-VERSION to ${red}${bump_to}"
+ print_info "${bold}The local integration branch is ${red}${local_int_branch}"
+ print_info "${bold}The remote integration branch is ${red}${remote_int_branch}"
+ print_info "${bold}After we've created the snapshot we'll bump the gcc/LINARO-VERSION to ${red}${bump_snapshot_to}"
fi
# Terminal lines (minus 7 to account for interesting prior output.
@@ -653,5 +681,5 @@ tar cfJ gcc-linaro-${rname}.tar.xz gcc-linaro-${rname}
popd 1>/dev/null
if [ "${SNAPSHOT:+set}" = "set" ]; then
- bump_and_dev "${bump_to}"
+ bump_and_dev "${bump_snapshot_to}"
fi