mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-17 11:41:06 +00:00
add old releases in a folder
This commit is contained in:
parent
d00992e3fc
commit
b742be9cad
1 changed files with 15 additions and 0 deletions
|
|
@ -3,6 +3,14 @@
|
|||
|
||||
set -e
|
||||
|
||||
function get_package_version {
|
||||
echo $(cat package.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{ print $2 }' \
|
||||
| sed 's/[",]//g')
|
||||
}
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Enter new version: "
|
||||
read VERSION
|
||||
|
|
@ -15,10 +23,17 @@ echo
|
|||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Releasing $VERSION ..."
|
||||
|
||||
# check errors
|
||||
npm run lint
|
||||
|
||||
# generate docs tree
|
||||
PACKAGE_VERSION=$(get_package_version)
|
||||
cp -Rf dist/docs tmp-docs
|
||||
|
||||
# build
|
||||
VERSION=$VERSION npm run build
|
||||
cp -Rf tmp-docs dist/docs/v$PACKAGE_VERSION
|
||||
rm -Rf tmp-docs
|
||||
|
||||
# commit
|
||||
git add -A
|
||||
|
|
|
|||
Loading…
Reference in a new issue