diff --git a/README.md b/README.md
index 1e545b0..210c681 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,17 @@ We are making `kubesecret` to give team members a guided approach to performing
**Please note that this tool runs ON TOP of `kubectl`. You need to have `kubectl` installed and running on your OS before using this tool**
-* Go to the releases, and download the binary for the OS of your choice.
+### npm
+
+```
+npm install -g @bufferapp/kubesecret
+```
+
+Now run `kubesecret help` to explore what you can do!
+
+### Download the binary
+
+* Go to the releases, and download the binary for the OS of your choice.
* Place the binary somewhere on your `$PATH`.
* Run it using `kubesecret help` to see what you can do with it.
@@ -22,7 +32,7 @@ We are making `kubesecret` to give team members a guided approach to performing
-While Windows support is currently not supported, we'll be taking care to try and not introduce patterns that exclude windows. We make no guarantees and you are free to run `node_modules/pkg/lib-es5/bin.js -t node10-win-x64` to get yourself a Windows binary and test things out. +While Windows support is currently not supported, we'll be taking care to try and not introduce patterns that exclude windows. We make no guarantees and you are free to run `node_modules/pkg/lib-es5/bin.js -t node10-win-x64` to get yourself a Windows binary and test things out.
@@ -33,3 +43,25 @@ While Windows support is currently not supported, we'll be taking care to try an * Run `npm install`. The tool is being developed using node `v10.x.x` * Code away * To test changes without building the binary run `node scripts/kubesecret.js` +* Install it globally on your machine using `npm link` + +### Publish to npm + +Use `npm version` to update the version name, add a commit and tag that commit prior to publishing. +For example: + +``` +npm version 0.5.0 +npm publish +``` + +Or if you want to publish a beta version, manually update the `package.json` version +(e.g. `0.5.0-beta1`) and run this command: + +``` +npm publish --tag beta +``` + +## License + +MIT diff --git a/package-lock.json b/package-lock.json index 9faaadc..4429c6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "kubesecret", - "version": "0.4.0", + "name": "@bufferapp/kubesecret", + "version": "0.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3c6f957..a0c7f93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "kubesecret", - "version": "0.4.0", + "name": "@bufferapp/kubesecret", + "version": "0.4.1", "description": "A CLI utility to manage secrets in kubernetes", "main": "\"\"", "dependencies": { @@ -24,13 +24,18 @@ "watchLinux": "while inotifywait -q -r -e modify ./lib ./tests; do npm run test; done;", "watchMac": "fswatch -r $(pwd) -e '\\.git/' -e 'node_modules/' -x | (while read; do npm run test; done)" }, - "bin": "scripts/kubesecret.js", + "bin": { + "kubesecret": "scripts/kubesecret.js" + }, "pkg": { "scripts": [ "./scripts/kubesecret*.js", "./lib/*.js" ] }, + "engine": { + "node": ">= 10.0.0" + }, "repository": { "type": "git", "url": "git+https://github.com/bufferapp/kubesecret.git" diff --git a/scripts/kubesecret.js b/scripts/kubesecret.js old mode 100644 new mode 100755 index 60b6281..7b6f326 --- a/scripts/kubesecret.js +++ b/scripts/kubesecret.js @@ -1,8 +1,10 @@ +#!/usr/bin/env node const program = require('commander'); +const { version } = require('../package.json') process.env.NODE_PATH = `${__dirname}/../node_modules`; -program.version('0.4.0'); +program.version(version); program.name('kubesecret'); program.usage('\nGet started by running ./kubesecret get -n