2014-03-20 03:43:38 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-10-14 23:29:48 +08:00
|
|
|
npm update
|
|
|
|
|
2015-10-14 22:56:50 +08:00
|
|
|
VERSION=$(node --eval "console.log(require('./package.json').version);")
|
2014-03-20 03:43:38 +08:00
|
|
|
|
2015-10-14 23:29:48 +08:00
|
|
|
npm test || exit 1
|
2014-03-20 03:43:38 +08:00
|
|
|
|
2015-10-14 23:29:48 +08:00
|
|
|
git checkout -b build
|
|
|
|
|
|
|
|
npm run build
|
|
|
|
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.map -f
|
2014-03-20 03:43:38 +08:00
|
|
|
|
2015-10-14 23:29:48 +08:00
|
|
|
copyfiles -u 1 build/*.json ./
|
2015-10-14 22:56:50 +08:00
|
|
|
tin -v $VERSION
|
2015-10-14 23:29:48 +08:00
|
|
|
git add component.json bower.json -f
|
|
|
|
|
|
|
|
git commit -m "v$VERSION"
|
|
|
|
|
|
|
|
git tag v$VERSION -f
|
|
|
|
git push --tags -f
|
|
|
|
|
|
|
|
npm publish --tag beta
|
|
|
|
|
|
|
|
git checkout master
|
|
|
|
git branch -D build
|