- fix issue #16: removed build script and prebuild hook

- implement release script
This commit is contained in:
Sefa Ilkimen
2017-09-29 16:35:34 +02:00
parent 08554c02cb
commit 4954385361
3 changed files with 17 additions and 3 deletions

View File

@@ -3,9 +3,7 @@
"version": "1.5.10",
"description": "Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning",
"scripts": {
"build": "cp node_modules/umd-tough-cookie/lib/umd-tough-cookie.js www/umd-tough-cookie.js",
"prepublish": "npm run build",
"test": "npm run build && ./scripts/test-installation.sh"
"test": "./scripts/test-installation.sh"
},
"cordova": {
"id": "cordova-plugin-advanced-http",

8
release.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
VERSION=$(node -e "console.log(require('./package.json').version)")
./scripts/update-tough-cookie.sh
npm publish
git tag "v$VERSION"

8
scripts/update-tough-cookie.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
cd $ROOT
npm i
cp node_modules/umd-tough-cookie/lib/umd-tough-cookie.js www/umd-tough-cookie.js