fix(Makefile): fix make tagrets

pull/291/head
Adam Reese 9 years ago
parent defc31a782
commit ba5500d600

4
.gitignore vendored

@ -1,2 +1,2 @@
vendor/ /vendor/
bin/helm /bin/

@ -4,10 +4,10 @@ endif
BIN_DIR := bin BIN_DIR := bin
DIST_DIR := _dist DIST_DIR := _dist
GO_PACKAGES := cmd dm GO_PACKAGES := cmd/helm dm
MAIN_GO := cmd/helm.go MAIN_GO := github.com/deis/helm-dm/cmd/helm
HELM_BIN := $(BIN_DIR)/helm HELM_BIN := helm-dm
PATH_WITH_HELM = PATH="$(shell pwd)/$(BIN_DIR):$(PATH)" PATH_WITH_HELM = PATH="$(shell pwd)/$(BIN_DIR)/helm:$(PATH)"
VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null)+$(shell git rev-parse --short HEAD) VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null)+$(shell git rev-parse --short HEAD)
@ -17,8 +17,8 @@ ifndef VERSION
VERSION := git-$(shell git rev-parse --short HEAD) VERSION := git-$(shell git rev-parse --short HEAD)
endif endif
build: $(MAIN_GO) build:
go build -o $(HELM_BIN) -ldflags "-X github.com/helm/helm/cmd.version=${VERSION}" $< go build -o bin/${HELM_BIN} -ldflags "-s -X main.version=${VERSION}" $(MAIN_GO)
bootstrap: bootstrap:
go get -u github.com/golang/lint/golint github.com/mitchellh/gox go get -u github.com/golang/lint/golint github.com/mitchellh/gox
@ -41,17 +41,7 @@ dist: build-all
install: build install: build
install -d ${DESTDIR}/usr/local/bin/ install -d ${DESTDIR}/usr/local/bin/
install -m 755 $(HELM_BIN) ${DESTDIR}/usr/local/bin/helm install -m 755 bin/${HELM_BIN} ${DESTDIR}/usr/local/bin/${HELM_BIN}
prep-bintray-json:
# TRAVIS_TAG is set to the tag name if the build is a tag
ifdef TRAVIS_TAG
@jq '.version.name |= "$(VERSION)"' _scripts/ci/bintray-template.json | \
jq '.package.repo |= "helm"' > _scripts/ci/bintray-ci.json
else
@jq '.version.name |= "$(VERSION)"' _scripts/ci/bintray-template.json \
> _scripts/ci/bintray-ci.json
endif
quicktest: quicktest:
$(PATH_WITH_HELM) go test -short $(addprefix ./,$(GO_PACKAGES)) $(PATH_WITH_HELM) go test -short $(addprefix ./,$(GO_PACKAGES))
@ -67,7 +57,7 @@ test-style:
golint $$i; \ golint $$i; \
done done
@for i in . $(GO_PACKAGES); do \ @for i in . $(GO_PACKAGES); do \
go vet github.com/helm/helm/$$i; \ go vet github.com/deis/helm-dm/$$i; \
done done
.PHONY: bootstrap \ .PHONY: bootstrap \
@ -76,7 +66,6 @@ test-style:
clean \ clean \
dist \ dist \
install \ install \
prep-bintray-json \
quicktest \ quicktest \
test \ test \
test-charts \ test-charts \

Loading…
Cancel
Save