Skip to content

Commit

Permalink
upgrade to go 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Oct 4, 2019
1 parent 9f7a667 commit 83a7a9c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
.PHONY: all deps build test check

GO ?= go
# "As of Go 1.13, the go command by default downloads and authenticates modules using the
# Go module mirror and Go checksum database run by Google"
# see go help module-private for detail
GOPRIVATE ?=
GOLINT ?= golint
ENV ?= local

GITURL ?= [email protected]

deps:
$(GO) mod tidy
GOPRIVATE=${GOPRIVATE} $(GO) mod download

# Use a github token or similar to access private repos
# In this example it's got no efffexct rather than changing from ssh to https
gitconfig:
git config --global url.${GITURL}.insteadOf https://github.com


build:
$(GO) build -ldflags="-X 'github.com/AndersonQ/go-skeleton/handlers.version=$$(git rev-parse HEAD)' -X 'github.com/AndersonQ/go-skeleton/handlers.buildTime=$$(date -R)'"
build: deps
ENV=${ENV} CGO_ENABLED=0 $(GO) build -ldflags="-X 'github.com/AndersonQ/go-skeleton/handlers.version=$$(git rev-parse HEAD)' -X 'github.com/AndersonQ/go-skeleton/handlers.buildTime=$$(date -R)'"

test: deps
$(GO) test -cover ./...
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ require (
github.com/rs/zerolog v1.14.3
github.com/stretchr/testify v1.3.0 // indirect
)

go 1.13

0 comments on commit 83a7a9c

Please sign in to comment.