mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-21 11:50:36 +03:00
build: add release script
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
git checkout master
|
||||||
|
git merge dev
|
||||||
|
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ -z $1 ]]; then
|
||||||
|
echo "Enter new version: "
|
||||||
|
read -r VERSION
|
||||||
|
else
|
||||||
|
VERSION=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "Releasing $VERSION - are you sure? (y/n) " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
echo "Releasing $VERSION ..."
|
||||||
|
|
||||||
|
# build
|
||||||
|
VERSION=$VERSION npm run build
|
||||||
|
|
||||||
|
npm version $VERSION --message "$VERSION"
|
||||||
|
|
||||||
|
# publish
|
||||||
|
git push origin master
|
||||||
|
git push origin refs/tags/v$VERSION
|
||||||
|
git checkout dev
|
||||||
|
git rebase master
|
||||||
|
git push origin dev
|
||||||
|
|
||||||
|
if [[ $VERSION =~ "beta" ]]
|
||||||
|
then
|
||||||
|
npm publish --tag beta
|
||||||
|
else
|
||||||
|
npm publish
|
||||||
|
fi
|
||||||
|
fi
|
||||||
+2
-2
@@ -10,11 +10,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --open --config build/webpack.dev.config.js",
|
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --open --config build/webpack.dev.config.js",
|
||||||
"demo": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.demo.config.js",
|
"demo": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.demo.config.js",
|
||||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.deploy.config.js",
|
"build": "npm run lint && npm test && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.deploy.config.js",
|
||||||
"lint": "eslint src/**/* test/**/*",
|
"lint": "eslint src/**/* test/**/*",
|
||||||
"test:push": "jest --coverage --coverageReporters=text-lcov | coveralls",
|
"test:push": "jest --coverage --coverageReporters=text-lcov | coveralls",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"deploy": "npm run lint && npm test && npm run build"
|
"deploy": "sh build/release.sh"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
|
|||||||
Reference in New Issue
Block a user