Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Commit

Permalink
Like 6a7576a but in javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Dec 28, 2016
1 parent 6a7576a commit 6b20a28
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
"through2": "^2.0.1"
},
"scripts": {
"client:version": "cd packages/plug-auth-client && npm version",
"server:version": "cd packages/plug-auth-server && npm version",
"preversion": "sh ./version.sh",
"postversion": "node version.js",
"prepublish": "npm run install-packages && npm run build",
"client:install": "cd packages/plug-auth-client && npm install",
"server:install": "cd packages/plug-auth-server && npm install",
Expand Down
13 changes: 13 additions & 0 deletions version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const fs = require('fs')
const join = require('path').join
const version = require('./package.json').version

function bump(name, version) {
const path = join(__dirname, 'packages', name, 'package.json')
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'))
pkg.version = version
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n', 'utf8')
}

bump('plug-auth-client', version)
bump('plug-auth-server', version)
4 changes: 0 additions & 4 deletions version.sh

This file was deleted.

0 comments on commit 6b20a28

Please sign in to comment.