mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-04 21:27:52 +08:00
Fix release script
This commit is contained in:
parent
0e35ab2e62
commit
6ac93e0bd2
19
build/git-release.sh
Normal file
19
build/git-release.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
git checkout dev
|
||||||
|
|
||||||
|
if test -n "$(git status --porcelain)"; then
|
||||||
|
echo 'Unclean working tree. Commit or stash changes first.' >&2;
|
||||||
|
exit 128;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! git fetch --quiet 2>/dev/null; then
|
||||||
|
echo 'There was a problem fetching your branch. Run `git fetch` to see more...' >&2;
|
||||||
|
exit 128;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "0" != "$(git rev-list --count --left-only @'{u}'...HEAD)"; then
|
||||||
|
echo 'Remote history differ. Please pull changes.' >&2;
|
||||||
|
exit 128;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'No conflicts.' >&2;
|
@ -1,8 +1,4 @@
|
|||||||
git checkout dev
|
#!/usr/bin/env sh
|
||||||
git pull eleme dev --rebase
|
|
||||||
git checkout master
|
|
||||||
git merge dev
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
echo "Enter release version: "
|
echo "Enter release version: "
|
||||||
read VERSION
|
read VERSION
|
||||||
@ -29,7 +25,11 @@ then
|
|||||||
npm version $VERSION --message "[release] $VERSION"
|
npm version $VERSION --message "[release] $VERSION"
|
||||||
|
|
||||||
# publish
|
# publish
|
||||||
git push eleme refs/tags/v$VERSION
|
git push eleme dev
|
||||||
|
git checkout master
|
||||||
|
git merge dev
|
||||||
git push eleme master
|
git push eleme master
|
||||||
|
git push eleme refs/tags/v$VERSION
|
||||||
|
|
||||||
npm publish
|
npm publish
|
||||||
fi
|
fi
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"dist:all": "node build/bin/build-all.js && npm run build:theme",
|
"dist:all": "node build/bin/build-all.js && npm run build:theme",
|
||||||
"i18n": "node build/bin/i18n.js",
|
"i18n": "node build/bin/i18n.js",
|
||||||
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
||||||
"pub": "sh build/release.sh",
|
"pub": "sh build/git-release.sh && sh build/release.sh",
|
||||||
"pub:all": "npm run dist:all && lerna publish",
|
"pub:all": "npm run dist:all && lerna publish",
|
||||||
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
|
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
|
||||||
"test:watch": "karma start test/unit/karma.conf.js"
|
"test:watch": "karma start test/unit/karma.conf.js"
|
||||||
|
Loading…
Reference in New Issue
Block a user