ansel0926
2022-05-18 f0efddd9e32b9c5dc828401c4092be004b4826cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
 
# get current version
VERSION=$(npm ls --json=true proj4js | grep version | awk '{ print $2}'| sed -e 's/^"//'  -e 's/"$//')
 
# Build
git checkout -b build
node_modules/.bin/grunt
git add dist -f
git commit -m "build $VERSION"
 
# Tag and push
git tag $VERSION
git push --tags git@github.com:proj4js/proj4js.git $VERSION
 
# Publish
npm publish
jam publish
 
# Cleanup
git checkout master
git branch -D build