* chore: trivial Makefile changes

Trivial `Makefile` changes regarding file pathing.

* chore: build flags

- Passes `-trimpath` flag to build tasks

- Creates `make ci` task and modifies `travis.yml` to use it

- Bumps version to `3.3.2`
This commit is contained in:
Chris Allen Lane 2020-01-29 08:50:47 -05:00 committed by GitHub
parent 3786ac96a5
commit e3764b81e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -2,3 +2,10 @@ language: go
go:
- 1.13.x
env:
- GO111MODULE=on
install: true
script: make ci

View File

@ -19,7 +19,7 @@ SORT := sort
ZIP := zip -m
# build flags
BUILD_FLAGS := -ldflags="-s -w" -mod vendor
BUILD_FLAGS := -ldflags="-s -w" -mod vendor -trimpath
GOBIN :=
# release binaries
@ -40,6 +40,10 @@ build: $(dist_dir)
.PHONY: build-release
build-release: $(releases)
## ci: builds a "release" executable for the current architecture (used in ci)
.PHONY: ci
ci: | setup prepare build
# cheat-darwin-amd64
$(dist_dir)/cheat-darwin-amd64: prepare
GOARCH=amd64 GOOS=darwin \
@ -91,7 +95,7 @@ clean: $(dist_dir)
## distclean: removes the tags file
.PHONY: distclean
distclean:
$(RM) ./tags
$(RM) tags
## setup: installs revive (linter) and scc (sloc tool)
.PHONY: setup
@ -106,7 +110,7 @@ sloc:
## tags: builds a tags file
.PHONY: tags
tags:
$(CTAGS) -R . --exclude=./vendor
$(CTAGS) -R . --exclude=vendor
## vendor: downloads, tidies, and verifies dependencies
.PHONY: vendor

View File

@ -13,7 +13,7 @@ import (
"github.com/cheat/cheat/internal/config"
)
const version = "3.3.1"
const version = "3.3.2"
func main() {