Skip to content

Commit f83713e

Browse files
authored
Merge pull request #298 from dlabrecq/PTNFLY-release
Removed -B switch from git checkout.
2 parents 995cbc8 + 5719b35 commit f83713e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scripts/release.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ default()
1212

1313
BOWER_JSON=bower.json
1414
PACKAGE_JSON=package.json
15+
SHRINKWRAP_JSON=npm-shrinkwrap.json
1516

1617
PTNFLY_REPO=https://github.com/patternfly/angular-patternfly.git
1718
PTNFLY_DIR="$TMP_DIR/angular-patternfly"
@@ -81,6 +82,11 @@ clean()
8182
if [ -d lib ]; then
8283
rm -rf lib
8384
fi
85+
86+
# shrinkwrap
87+
if [ -s $SHRINKWRAP_JSON ]; then
88+
rm -f $SHRINKWRAP_JSON
89+
fi
8490
}
8591

8692
# Install dependencies
@@ -138,7 +144,10 @@ setup_repo() {
138144
git clone $PTNFLY_REPO
139145
cd $PTNFLY_DIR
140146

141-
git checkout -B $BRANCH
147+
git checkout $BRANCH
148+
if [ "$?" -ne 0 ]; then
149+
git checkout -B $BRANCH
150+
fi
142151
check $? "Local repo setup failure"
143152
}
144153

@@ -148,11 +157,6 @@ shrinkwrap()
148157
echo "*** Shrink wrapping $SHRINKWRAP_JSON"
149158
cd $PTNFLY_DIR
150159

151-
# shrinkwrap
152-
if [ -s $SHRINKWRAP_JSON ]; then
153-
rm -f $SHRINKWRAP_JSON
154-
fi
155-
156160
npm shrinkwrap
157161
check $? "npm shrinkwrap failure"
158162
}

0 commit comments

Comments
 (0)