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

Commit f1a8d41

Browse files
committed
chore(scripts): fix bower script to pull from master before updating
1 parent 8864e54 commit f1a8d41

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: scripts/bower/publish.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ REPOS=(
3333
# download and unzip the file
3434
#
3535

36-
#wget $ZIP_FILE_URL
37-
unzip $ZIP_FILE
36+
if [ ! -f $ZIP_FILE ]; then
37+
wget $ZIP_FILE_URL
38+
unzip $ZIP_FILE
39+
fi
3840

3941

4042
#
@@ -46,8 +48,10 @@ do
4648
if [ -f $ZIP_DIR/$repo.js ] # ignore i18l
4749
then
4850
cd bower-$repo
49-
git checkout master
5051
git reset --hard HEAD
52+
git checkout master
53+
git fetch --all
54+
git reset --hard origin/master
5155
cd ..
5256
mv $ZIP_DIR/$repo.* bower-$repo/
5357
fi
@@ -76,7 +80,6 @@ echo $NEW_VERSION
7680
for repo in "${REPOS[@]}"
7781
do
7882
cd bower-$repo
79-
pwd
8083
sed -i '' -e "s/$OLD_VERSION/$NEW_VERSION/g" bower.json
8184
git add -A
8285
git commit -m "v$NEW_VERSION"

0 commit comments

Comments
 (0)