Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Add Makefile target to build and install into GOPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
croomes committed Jan 24, 2018
1 parent 46742b0 commit 0db9999
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ build:
@echo "++ Building storageos binary"
cd cmd/storageos && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)"

install:
@echo "++ Installing storageos binary into \$GOPATH/bin"
touch version/client.go && go install -ldflags "$(LDFLAGS)" github.com/storageos/go-cli/cmd/storageos

release:
@echo "++ Building storageos release binaries"
go get github.com/mitchellh/gox
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ Checkout `go-cli` into your `GOPATH`. Consult https://github.com/golang/go/wiki
go get -d github.com/storageos/go-cli/...
```

### Build & install local binary into $GOPATH/bin

```bash
cd $GOPATH/src/github.com/storageos/go-cli
make install
```

The binary will be in `$GOPATH/bin/storageos`

### Building local binary

```bash
Expand Down

0 comments on commit 0db9999

Please sign in to comment.