Publish script.
This commit is contained in:
parent
697ad50f1d
commit
3fb3eb437f
3 changed files with 50 additions and 2 deletions
25
publish.sh
Executable file
25
publish.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
version=$(grep '^ *"version": *"[^"]*" *, *$' package.json | cut -d '"' -f4)
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "Could not determine current version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Current version: $version"
|
||||
|
||||
if [[ $version =~ 'SNAPSHOT' ]]; then
|
||||
echo "Will not publish SNAPSHOT version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./node_modules/.bin/grunt clean build
|
||||
|
||||
cd dist
|
||||
npm publish
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue