Skip to content

Commit 3a16dba

Browse files
authored
Merge pull request patternfly#425 from dlabrecq/PTNFLY-release
Removed -B switch from git checkout.
2 parents 71a2721 + 7b1c909 commit 3a16dba

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

scripts/release.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ clean()
7676
if [ -d components ]; then
7777
rm -rf components
7878
fi
79+
80+
# shrinkwrap
81+
if [ -s $SHRINKWRAP_JSON ]; then
82+
rm -f $SHRINKWRAP_JSON
83+
fi
7984
}
8085

8186
# Install dependencies
@@ -136,7 +141,10 @@ setup_repo() {
136141
git clone $PTNFLY_REPO
137142
cd $PTNFLY_DIR
138143

139-
git checkout -B $BRANCH
144+
git checkout $BRANCH
145+
if [ "$?" -ne 0 ]; then
146+
git checkout -B $BRANCH
147+
fi
140148
check $? "Local repo setup failure"
141149
}
142150

@@ -146,11 +154,6 @@ shrinkwrap()
146154
echo "*** Shrink wrapping $SHRINKWRAP_JSON"
147155
cd $PTNFLY_DIR
148156

149-
# shrinkwrap
150-
if [ -s $SHRINKWRAP_JSON ]; then
151-
rm -f $SHRINKWRAP_JSON
152-
fi
153-
154157
npm shrinkwrap
155158
check $? "npm shrinkwrap failure"
156159
}

0 commit comments

Comments
 (0)