mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-17 09:37:02 +00:00
Use golang:1.8.3
This commit is contained in:
16
Makefile
16
Makefile
@@ -7,6 +7,7 @@ DIR_PKG=$(subst /src/github.com/directorz/mailfull-go,/pkg,$(PWD))
|
||||
DIR_BUILD=build
|
||||
DIR_RELEASE=release
|
||||
VERSION=$(patsubst "%",%,$(lastword $(shell grep 'const Version' version.go)))
|
||||
GITTAG=$(shell git rev-parse --short HEAD)
|
||||
|
||||
.PHONY: build build-linux-amd64 build-linux-386 clean
|
||||
|
||||
@@ -24,17 +25,18 @@ installdeps: dep
|
||||
$(DIR_BUILD)/bin/$(THIS_GOOS)_$(THIS_GOARCH)/dep ensure -v
|
||||
|
||||
build:
|
||||
go build -v -ldflags "-X main.gittag=`git rev-parse --short HEAD`" -o build/mailfull_$(GOOS)_$(GOARCH)/mailfull cmd/mailfull/mailfull.go
|
||||
go build -v -i -ldflags "-X main.gittag=$(GITTAG)" -o $(DIR_BUILD)/mailfull_$(GOOS)_$(GOARCH)/mailfull cmd/mailfull/*.go
|
||||
|
||||
.build-docker:
|
||||
docker run --rm -v $(DIR_PKG):/go/pkg -v $(PWD):/go/src/github.com/directorz/mailfull-go -w /go/src/github.com/directorz/mailfull-go \
|
||||
-e GOOS=$(GOOS) -e GOARCH=$(GOARCH) golang:1.8.3 \
|
||||
go build -v -i -ldflags "-X main.gittag=$(GITTAG)" -o $(DIR_BUILD)/mailfull_$(GOOS)_$(GOARCH)/mailfull cmd/mailfull/*.go
|
||||
|
||||
build-linux-amd64:
|
||||
docker run --rm -v $(PWD):/go/src/github.com/directorz/mailfull-go -w /go/src/github.com/directorz/mailfull-go \
|
||||
-e GOOS=linux -e GOARCH=amd64 golang:1.7.4 \
|
||||
go build -v -ldflags "-X main.gittag=`git rev-parse --short HEAD`" -o "build/mailfull_linux_amd64/mailfull" cmd/mailfull/mailfull.go
|
||||
@$(MAKE) .build-docker GOOS=linux GOARCH=amd64
|
||||
|
||||
build-linux-386:
|
||||
docker run --rm -v $(PWD):/go/src/github.com/directorz/mailfull-go -w /go/src/github.com/directorz/mailfull-go \
|
||||
-e GOOS=linux -e GOARCH=386 golang:1.7.4 \
|
||||
go build -v -ldflags "-X main.gittag=`git rev-parse --short HEAD`" -o "build/mailfull_linux_386/mailfull" cmd/mailfull/mailfull.go
|
||||
@$(MAKE) .build-docker GOOS=linux GOARCH=386
|
||||
|
||||
release: release-linux-amd64 release-linux-386
|
||||
|
||||
|
||||
Reference in New Issue
Block a user