Skip to content

Commit 305ab9b

Browse files
josephfrazierstefanbuck
authored andcommitted
Upon npm version: update assets/manifest.json (OctoLinker#137)
`npm version` is an easy way to commit a new version, but it only updates `package.json`. This script ensures that the version in `assets/manifest.json` is kept in sync, to avoid a reoccurrence of OctoLinker#136 (comment) See here for details about `npm version` and its associated package.json scripts: https://docs.npmjs.com/cli/version
1 parent a6343e1 commit 305ab9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"pretest": "npm run lint",
1212
"test": "karma start",
1313
"test:watch": "karma start --no-single-run --auto-watch",
14+
"version": "json -I -f assets/manifest.json -e \"this.version='`json -f package.json version`'\" && git add assets/manifest.json",
1415
"package-all": "npm-run-all chrome-pack firefox-pack && cp out/chrome-octolinker-$npm_package_version.zip out/opera-octolinker-$npm_package_version.zip",
1516
"release": "webstore upload --source out/chrome-octolinker-$npm_package_version.zip --auto-publish",
1617
"chrome-manifest": "mkdir -p dist && json -e 'delete this.applications; this.permissions.shift()' < assets/manifest.json > dist/manifest.json",

0 commit comments

Comments
 (0)