Skip to content

Commit

Permalink
Add ngo-binary command line
Browse files Browse the repository at this point in the history
  • Loading branch information
doesdev committed Apr 14, 2018
1 parent 80fdf88 commit 7087f99
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 23 deletions.
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### Changelog
All notable changes to this project will be documented in this file.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.4.5](https://github.com/doesdev/ngo/compare/2.4.4...2.4.5)
> 20 March 2018
- Update deps and use gh token var in appveyor [`3da334d`](https://github.com/doesdev/ngo/commit/3da334db9772792a27721f6f7f7d4ee9f536a8b9)
- Release with updated deps and cpu arch fix [`7fc4630`](https://github.com/doesdev/ngo/commit/7fc46304cc800281a426f9e43abc1b1623f31f67)
- Don't start installing go in test until clean [`d1552fc`](https://github.com/doesdev/ngo/commit/d1552fc3de057ca5552944870e0a3099b5c61294)

#### [2.4.4](https://github.com/doesdev/ngo/compare/2.4.3...2.4.4)
> 18 March 2018
- Expose environment vars [`e75a398`](https://github.com/doesdev/ngo/commit/e75a398e17d7f9ffc207815b9ab5f2d579ddbc87)

#### [2.4.3](https://github.com/doesdev/ngo/compare/2.4.2...2.4.3)
> 18 March 2018
- Set GOBIN env variable [`6be816f`](https://github.com/doesdev/ngo/commit/6be816f273b39d5d5dcd104dd41eecb0198588a3)

#### [2.4.2](https://github.com/doesdev/ngo/compare/2.4.1...2.4.2)
> 17 March 2018
- More cli tweaks [`09351e2`](https://github.com/doesdev/ngo/commit/09351e2a6042affb26fc73f7e1ec0b4839e87e06)

#### [2.4.1](https://github.com/doesdev/ngo/compare/2.4.0...2.4.1)
> 17 March 2018
- Unbreak it [`bb0836b`](https://github.com/doesdev/ngo/commit/bb0836bf2ad7863095fddd0ce639225ea618c60e)

#### [2.4.0](https://github.com/doesdev/ngo/compare/2.3.3...2.4.0)
> 17 March 2018
- Use pipes in cli [`8e5fe26`](https://github.com/doesdev/ngo/commit/8e5fe267d597501d4dfff253972a70fbdfad8aff)

#### [2.3.3](https://github.com/doesdev/ngo/compare/2.3.2...2.3.3)
> 16 March 2018
- Hopefully the last tweak on installDeps error [`947a080`](https://github.com/doesdev/ngo/commit/947a080a122390c5846163164863232c38c9d595)

#### [2.3.2](https://github.com/doesdev/ngo/compare/2.3.1...2.3.2)
> 16 March 2018
- Reject, not resolve that last guy [`e202723`](https://github.com/doesdev/ngo/commit/e2027232824d9e53f6054a590c2a69ec58882f0b)

#### [2.3.1](https://github.com/doesdev/ngo/compare/2.3.0...2.3.1)
> 16 March 2018
- Tweak error handling in installDeps [`c52cddd`](https://github.com/doesdev/ngo/commit/c52cdddf1daba380f97eaacdc5d76ff6090637e3)

#### [2.3.0](https://github.com/doesdev/ngo/compare/2.2.1...2.3.0)
> 16 March 2018
- Make it mo awesome, install missing pkgs [`78fa227`](https://github.com/doesdev/ngo/commit/78fa2271d9b5c530d6a225ac1c36aa1174b78b7e)

#### [2.2.1](https://github.com/doesdev/ngo/compare/2.2.0...2.2.1)
> 16 March 2018
- Fix update cli [`2ac6a48`](https://github.com/doesdev/ngo/commit/2ac6a482adb45a0d2c1205f98f649d7ac651cfb3)

#### [2.2.0](https://github.com/doesdev/ngo/compare/2.1.1...2.2.0)
> 16 March 2018
- Add update command / option [`0cdc2e1`](https://github.com/doesdev/ngo/commit/0cdc2e1d208afddb0900d039de806eaee354e48e)

#### [2.1.1](https://github.com/doesdev/ngo/compare/2.1.0...2.1.1)
> 15 March 2018
- Update deps [`30be910`](https://github.com/doesdev/ngo/commit/30be91065f65d4eace4695dd2cb820f75bd38beb)

#### [2.1.0](https://github.com/doesdev/ngo/compare/v2.0.0...2.1.0)
> 27 January 2018
- Use go-versions 1.1.0 [`f0ac537`](https://github.com/doesdev/ngo/commit/f0ac537f0f8d7cdae26d98b5b781ef6f1d6540a9)
- Add deps badge [`e4769c7`](https://github.com/doesdev/ngo/commit/e4769c78db45326748aae454b5153ed7040c0a32)

#### v2.0.0
> 29 May 2017
- Update readme to reflect v2.0.0 API [`89199c9`](https://github.com/doesdev/ngo/commit/89199c96246adf8a2d936b0da73ec0ce86c09a11)
- Update execa, ensure opts are passed correctly [`4db70e9`](https://github.com/doesdev/ngo/commit/4db70e9cbfa58d36a4f41d51a32236f6e2a70022)
- Simplify API a bit [`573025d`](https://github.com/doesdev/ngo/commit/573025d1039b0b7ef1be480bfdf2f544c50c5b33)

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ $ ngo version
# to update the `ngo` install of Go (won't update system version)
$ ngo-update
# go version go1.9.4 windows/amd64

# to run a `go get` installed binary use this bs
$ ngo-binary golint test/fixtures/errors.go
# test\fixtures\errors.go:13:5: error var unexp should have name of the form errFoo
```

#### programmatic usage
Expand Down
13 changes: 13 additions & 0 deletions cli-binary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /usr/bin/env node
'use strict'

const args = process.argv.slice(2)
const goBinary = require('./index.js')().bin(args[0])(args.slice(1))
if (goBinary.stdout && goBinary.stderr) {
goBinary.stdout.pipe(process.stdout)
goBinary.stderr.pipe(process.stderr)
goBinary.catch(() => {})
} else {
goBinary.then((r) => console.log(r.stdout || r))
goBinary.catch((err) => console.error(err.message || err))
}

0 comments on commit 7087f99

Please sign in to comment.