File: publish.sh

package info (click to toggle)
mgrs 0.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 172 kB
  • ctags: 29
  • sloc: sh: 12; makefile: 7
file content (21 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# get current version
VERSION=$(npm ls --json=true mgrs | grep version | awk '{ print $2}'| sed -e 's/^"//'  -e 's/"$//')

# Build
git checkout -b build
npm run build
git add dist -f
git commit -m "build $VERSION"

# Tag and push
git tag $VERSION
git push --tags git@github.com:proj4js/mgrs.git $VERSION

# Publish
npm publish

# Cleanup
git checkout master
git branch -D build