-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into support_header_flags
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ PWD := $(shell pwd) | |
GOPATH := $(shell go env GOPATH) | ||
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) | ||
|
||
GOARCH := $(shell go env GOARCH) | ||
GOOS := $(shell go env GOOS) | ||
GOARCH ?= $(shell go env GOARCH) | ||
GOOS ?= $(shell go env GOOS) | ||
|
||
VERSION ?= $(shell git describe --tags) | ||
TAG ?= "minio/mc:$(VERSION)" | ||
|
@@ -64,7 +64,7 @@ verify: | |
# Builds mc locally. | ||
build: checks | ||
@echo "Building mc binary to './mc'" | ||
@GO111MODULE=on CGO_ENABLED=0 go build -trimpath -tags kqueue --ldflags "$(LDFLAGS)" -o $(PWD)/mc | ||
@GO111MODULE=on GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -trimpath -tags kqueue --ldflags "$(LDFLAGS)" -o $(PWD)/mc | ||
|
||
hotfix-vars: | ||
$(eval LDFLAGS := $(shell MC_RELEASE="RELEASE" MC_HOTFIX="hotfix.$(shell git rev-parse --short HEAD)" go run buildscripts/gen-ldflags.go $(shell git describe --tags --abbrev=0 | \ | ||
|
@@ -78,9 +78,9 @@ hotfix: hotfix-vars install ## builds mc binary with hotfix tags | |
@sha256sum < ./mc.$(VERSION) | sed 's, -,mc.$(VERSION),g' > mc.$(VERSION).sha256sum | ||
|
||
hotfix-push: hotfix | ||
@scp -q -r mc.$(VERSION)* [email protected]:~/releases/client/mc/hotfixes/linux-amd64/archive/ | ||
@scp -q -r mc.$(VERSION)* [email protected]:~/releases/client/mc/hotfixes/linux-amd64/archive/ | ||
@echo "Published new hotfix binaries at https://dl.min.io/client/mc/hotfixes/linux-amd64/archive/mc.$(VERSION)" | ||
@scp -q -r mc.$(VERSION)* [email protected]:~/releases/client/mc/hotfixes/linux-$(GOARCH)/archive/ | ||
@scp -q -r mc.$(VERSION)* [email protected]:~/releases/client/mc/hotfixes/linux-$(GOARCH)/archive/ | ||
@echo "Published new hotfix binaries at https://dl.min.io/client/mc/hotfixes/linux-$(GOARCH)/archive/mc.$(VERSION)" | ||
|
||
docker-hotfix-push: docker-hotfix | ||
@docker push -q $(TAG) && echo "Published new container $(TAG)" | ||
|