Skip to content

Commit

Permalink
Build flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviof committed Sep 22, 2019
1 parent 066e2fd commit 118e643
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ builds:
- linux
env:
- CGO_ENABLED=0
- GO111MODULE=on
flags:
-a
- -a
- -mod=vendor
goarch:
- amd64
- id: darwin
Expand All @@ -24,7 +26,9 @@ builds:
- darwin
env:
- CGO_ENABLED=0
- GO111MODULE=on
flags:
-a
- -a
- -mod=vendor
goarch:
- amd64
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_DIR ?= build
# end-to-end directory
E2E_DIR ?= test/e2e
# build flags
BUILD_FLAGS ?= -v -a -ldflags=-s
BUILD_FLAGS ?= -v -a -ldflags=-s -mod=vendor
# gopath copy from environment
GOPATH ?= ${GOPATH}

Expand All @@ -19,10 +19,10 @@ bootstrap:
GO111MODULE=on go mod vendor

build: clean
CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP) cmd/$(APP)/*
GO111MODULE=on CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APP) cmd/$(APP)/*

install: build
CGO_ENABLED=0 go install $(BUILD_FLAGS) cmd/$(APP)/*
GO111MODULE=on CGO_ENABLED=0 go install $(BUILD_FLAGS) cmd/$(APP)/*

clean:
rm -rf $(BUILD_DIR) > /dev/null
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<a alt="Code Coverage" href="https://codecov.io/gh/otaviof/path-helper">
<img alt="Code Coverage" src="https://codecov.io/gh/otaviof/path-helper/branch/master/graph/badge.svg">
</a>
<a href="https://godoc.org/github.com/otaviof/path-helper">
<img alt="GoDoc Reference" src="https://godoc.org/github.com/otaviof/path-helper?status.svg">
<a href="https://godoc.org/github.com/otaviof/path-helper/pkg/path-helper">
<img alt="GoDoc Reference" src="https://godoc.org/github.com/otaviof/path-helper/pkg/path-helper?status.svg">
</a>
<a alt="CI Status" href="https://travis-ci.com/otaviof/path-helper">
<img alt="CI Status" src="https://travis-ci.com/otaviof/path-helper.svg?branch=master">
Expand All @@ -19,10 +19,14 @@ Command-line application to generate `$PATH` based in a `paths.d` (`/etc/paths.d

## Install

To install `path-helper` you can simply `go get`, for instance:

```bash
go get -u github.com/otaviof/path-helper/cmd/path-helper
```

Alternatively, you can:

```bash
make instal
```
Expand Down

0 comments on commit 118e643

Please sign in to comment.