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
|
|
|
|
|
2016-04-18 16:10:27 +08:00
|
|
|
jake build[,,true]
|
2015-10-14 23:29:48 +08:00
|
|
|
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
|
|
|
git commit -m "v$VERSION"
|
|
|
|
|
|
|
|
git tag v$VERSION -f
|
|
|
|
git push --tags -f
|
|
|
|
|
2016-04-18 16:15:46 +08:00
|
|
|
npm publish --tag rc
|
2015-10-14 23:29:48 +08:00
|
|
|
|
|
|
|
git checkout master
|
|
|
|
git branch -D build
|