Skip to content

Commit 0a0b1f4

Browse files
committed
Modify release script to support upgrade GitHub Pages
1 parent 68620d1 commit 0a0b1f4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

release.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,27 @@ then
1818
# commit
1919
git add -A
2020
git commit -m "Build for $VERSION"
21-
npm version $VERSION --message "Upgrade to $VERSION"
21+
npm version $VERSION -m "Upgrade to $VERSION"
2222

2323
# publish
24-
git push
2524
npm publish
25+
echo "Publish $VERSION successfully!"
26+
27+
read -p "Upgrade GitHub Pages? (y/n)" -n 1 -r
28+
echo # (optional) move to a new line
29+
if [[ $REPLY =~ ^[Yy]$ ]]
30+
then
31+
echo "Upgrade GitHub Pages ..."
32+
# upgrade GitHub Pages
33+
git checkout gh-pages
34+
npm install vue-infinite-loading@$VERSION --save
35+
VERSION=$VERSION npm run build
36+
git add -A
37+
git commit -m "Upgrade GitHub Pages to $VERSION"
38+
git checkout master
39+
fi
40+
41+
# push
42+
git push
43+
echo "Done!"
2644
fi

0 commit comments

Comments
 (0)