From defc31a7829cd64aad5e203c663177561b48b2e9 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Sat, 30 Jan 2016 14:28:27 -0800 Subject: [PATCH 1/2] chore(*): move /cmd to /cmd/helm --- cmd/{ => helm}/deploy.go | 0 cmd/{ => helm}/helm.go | 0 cmd/{ => helm}/install.go | 0 cmd/{ => helm}/list.go | 0 cmd/{ => helm}/properties.go | 0 cmd/{ => helm}/target.go | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename cmd/{ => helm}/deploy.go (100%) rename cmd/{ => helm}/helm.go (100%) rename cmd/{ => helm}/install.go (100%) rename cmd/{ => helm}/list.go (100%) rename cmd/{ => helm}/properties.go (100%) rename cmd/{ => helm}/target.go (100%) diff --git a/cmd/deploy.go b/cmd/helm/deploy.go similarity index 100% rename from cmd/deploy.go rename to cmd/helm/deploy.go diff --git a/cmd/helm.go b/cmd/helm/helm.go similarity index 100% rename from cmd/helm.go rename to cmd/helm/helm.go diff --git a/cmd/install.go b/cmd/helm/install.go similarity index 100% rename from cmd/install.go rename to cmd/helm/install.go diff --git a/cmd/list.go b/cmd/helm/list.go similarity index 100% rename from cmd/list.go rename to cmd/helm/list.go diff --git a/cmd/properties.go b/cmd/helm/properties.go similarity index 100% rename from cmd/properties.go rename to cmd/helm/properties.go diff --git a/cmd/target.go b/cmd/helm/target.go similarity index 100% rename from cmd/target.go rename to cmd/helm/target.go From ba5500d6006cd7f186cbcf9e8d578f490f5d7692 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Sat, 30 Jan 2016 14:37:35 -0800 Subject: [PATCH 2/2] fix(Makefile): fix make tagrets --- .gitignore | 4 ++-- Makefile | 27 ++++++++------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 0f34b7d2d..6c1ce6f06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -vendor/ -bin/helm +/vendor/ +/bin/ diff --git a/Makefile b/Makefile index 974e04d5e..94307ab20 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ endif BIN_DIR := bin DIST_DIR := _dist -GO_PACKAGES := cmd dm -MAIN_GO := cmd/helm.go -HELM_BIN := $(BIN_DIR)/helm -PATH_WITH_HELM = PATH="$(shell pwd)/$(BIN_DIR):$(PATH)" +GO_PACKAGES := cmd/helm dm +MAIN_GO := github.com/deis/helm-dm/cmd/helm +HELM_BIN := helm-dm +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) @@ -17,8 +17,8 @@ ifndef VERSION VERSION := git-$(shell git rev-parse --short HEAD) endif -build: $(MAIN_GO) - go build -o $(HELM_BIN) -ldflags "-X github.com/helm/helm/cmd.version=${VERSION}" $< +build: + go build -o bin/${HELM_BIN} -ldflags "-s -X main.version=${VERSION}" $(MAIN_GO) bootstrap: go get -u github.com/golang/lint/golint github.com/mitchellh/gox @@ -41,17 +41,7 @@ dist: build-all install: build install -d ${DESTDIR}/usr/local/bin/ - install -m 755 $(HELM_BIN) ${DESTDIR}/usr/local/bin/helm - -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 + install -m 755 bin/${HELM_BIN} ${DESTDIR}/usr/local/bin/${HELM_BIN} quicktest: $(PATH_WITH_HELM) go test -short $(addprefix ./,$(GO_PACKAGES)) @@ -67,7 +57,7 @@ test-style: golint $$i; \ done @for i in . $(GO_PACKAGES); do \ - go vet github.com/helm/helm/$$i; \ + go vet github.com/deis/helm-dm/$$i; \ done .PHONY: bootstrap \ @@ -76,7 +66,6 @@ test-style: clean \ dist \ install \ - prep-bintray-json \ quicktest \ test \ test-charts \