Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 9ccfe8e

Browse files
added option to avoid creating a new branch when all I want to do is update the autoloader
1 parent 251b599 commit 9ccfe8e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

tools/cut-release.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ function help_and_exit() {
66
echo "Moves minified CSS and JS to distribution directories and"
77
echo "creates a branch in SVN."
88
echo
9-
echo " -go: Run commands instead of just echoing them."
10-
echo " -verbose: More verbose logging."
11-
echo " -force: Ignore sanity checks for testing."
12-
echo " Incompatible with -go."
9+
echo " -go: Run commands instead of just echoing them."
10+
echo " -verbose: More verbose logging."
11+
echo " -force: Ignore sanity checks for testing."
12+
echo " Incompatible with -go."
13+
echo " -nobranch: Don't create a new release branch."
1314
exit "$1"
1415
}
1516

@@ -19,6 +20,8 @@ export VERBOSE="0"
1920
export EFFECT="0"
2021
# 1 to not exit on panic.
2122
export NO_PANIC="0"
23+
# 1 to create a new branch under branches/
24+
export BRANCH="1"
2225

2326
function panic() {
2427
echo "PANIC: $*"
@@ -64,6 +67,9 @@ for var in "$@"; do
6467
-force)
6568
NO_PANIC="1"
6669
;;
70+
--nobranch)
71+
BRANCH="0"
72+
;;
6773
-h)
6874
help_and_exit 0
6975
;;
@@ -92,7 +98,7 @@ fi
9298
if ! [ -d "$VERSION_BASE/loader" ]; then
9399
panic "missing loader in $VERSION_BASE"
94100
fi
95-
if ! [ -d "$VERSION_BASE/branches" ]; then
101+
if (( $BRANCH )) && ! [ -d "$VERSION_BASE/branches" ]; then
96102
panic "missing branches in $VERSION_BASE"
97103
fi
98104

@@ -108,7 +114,7 @@ if (( $VERBOSE )); then
108114
echo "RELEASE_LABEL=$RELEASE_LABEL"
109115
fi
110116

111-
if [ -e "$VERSION_BASE/branches/$RELEASE_LABEL" ]; then
117+
if (( $BRANCH )) && [ -e "$VERSION_BASE/branches/$RELEASE_LABEL" ]; then
112118
panic "duplicate release $VERSION_BASE/branches/$RELEASE_LABEL"
113119
fi
114120

@@ -192,7 +198,9 @@ sync svn_sync "$VERSION_BASE/trunk/styles" \
192198
"$VERSION_BASE/loader/skins" css
193199

194200
# Cut branch
195-
command svn copy "$VERSION_BASE/trunk" "$VERSION_BASE/branches/$RELEASE_LABEL"
201+
if (( $BRANCH )); then
202+
command svn copy "$VERSION_BASE/trunk" "$VERSION_BASE/branches/$RELEASE_LABEL"
203+
fi
196204

197205
cp_if_different "$VERSION_BASE/trunk/distrib/prettify.tar.bz2" \
198206
"$VERSION_BASE/trunk/distrib/prettify-$TODAY.tar.bz2"

0 commit comments

Comments
 (0)