From 097b8760c05260b508095ff32430586f9e127860 Mon Sep 17 00:00:00 2001 From: Andriy Knysh Date: Wed, 14 Mar 2018 15:37:51 -0400 Subject: [PATCH] Fix `make` targets (#46) --- modules/go/Makefile.build | 4 ++-- modules/go/Makefile.style | 2 +- modules/helm/Makefile.repo | 4 ++-- modules/semver/Makefile | 24 ++++++++++++------------ modules/stages/Makefile | 12 ++++++------ 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/go/Makefile.build b/modules/go/Makefile.build index b95861a8..69baf8cc 100644 --- a/modules/go/Makefile.build +++ b/modules/go/Makefile.build @@ -41,11 +41,11 @@ go/clean: rm -rf $(RELEASE_DIR) ## Clean compiled binary and dependency -go/clean-all: clean +go/clean-all: go/clean rm -rf vendor rm -rf glide.lock ## Install cli -go/install: $(APP) build +go/install: $(APP) go/build cp $(RELEASE_DIR)/$(APP) $(INSTALL_DIR) chmod 555 $(INSTALL_DIR)/$(APP) diff --git a/modules/go/Makefile.style b/modules/go/Makefile.style index 30afccdf..fc95cea4 100644 --- a/modules/go/Makefile.style +++ b/modules/go/Makefile.style @@ -1,5 +1,5 @@ ## Lint code -go/lint: $(GO) vet +go/lint: $(GO) go/vet $(call assert-set,GO) find . ! -path "*/vendor/*" ! -path "*/.glide/*" -type f -name '*.go' | xargs -n 1 golint diff --git a/modules/helm/Makefile.repo b/modules/helm/Makefile.repo index eb09fa12..dbe803a2 100644 --- a/modules/helm/Makefile.repo +++ b/modules/helm/Makefile.repo @@ -14,9 +14,9 @@ else endif ifeq ($(BRANCH),master) - CURRENT_REPO_URL?=$(REPO_URL) + CURRENT_REPO_URL?=$(REPO_URL) else - CURRENT_REPO_URL?=https://charts.dev.cloudposse.com/$(BRANCH) + CURRENT_REPO_URL?=https://charts.dev.cloudposse.com/$(BRANCH) endif ## Show repo info diff --git a/modules/semver/Makefile b/modules/semver/Makefile index f7e28827..61af17aa 100644 --- a/modules/semver/Makefile +++ b/modules/semver/Makefile @@ -12,9 +12,9 @@ SEMVERSIONS += $(SEMVERSION_COMMIT) ## If we are on git tag. ex.: 0.3.1 SEMVERSION_TAG = ifeq ($(GIT_IS_TAG),1) - ## Version based on tag. ex.: 0.3.1 - SEMVERSION_TAG = $(GIT_LATEST_TAG) - SEMVERSIONS += $(SEMVERSION_TAG) + ## Version based on tag. ex.: 0.3.1 + SEMVERSION_TAG = $(GIT_LATEST_TAG) + SEMVERSIONS += $(SEMVERSION_TAG) endif ## If we are on git branch. ex.: master @@ -22,17 +22,17 @@ SEMVERSION_BRANCH= SEMVERSION_BRANCH_COMMIT_SHORT= SEMVERSION_BRANCH_COMMIT= ifeq ($(GIT_IS_BRANCH),1) - ## Version based on branch. ex.: 0.3.1-master - SEMVERSION_BRANCH = $(GIT_LATEST_TAG)-$(GIT_BRANCH) - SEMVERSIONS += $(SEMVERSION_BRANCH) + ## Version based on branch. ex.: 0.3.1-master + SEMVERSION_BRANCH = $(GIT_LATEST_TAG)-$(GIT_BRANCH) + SEMVERSIONS += $(SEMVERSION_BRANCH) - ## Version based on branch and short commit. ex.: 0.3.1-master.sha.80b9f6f - SEMVERSION_BRANCH_COMMIT_SHORT = $(GIT_LATEST_TAG)-$(GIT_BRANCH).sha.$(GIT_COMMIT_SHORT) - SEMVERSIONS += $(SEMVERSION_BRANCH_COMMIT_SHORT) + ## Version based on branch and short commit. ex.: 0.3.1-master.sha.80b9f6f + SEMVERSION_BRANCH_COMMIT_SHORT = $(GIT_LATEST_TAG)-$(GIT_BRANCH).sha.$(GIT_COMMIT_SHORT) + SEMVERSIONS += $(SEMVERSION_BRANCH_COMMIT_SHORT) - ## Version based on branch and long commit. ex.: 0.3.1-master.sha.80b9f6f5b965555e406b9db066a8e16cb1075e5f - SEMVERSION_BRANCH_COMMIT = $(GIT_LATEST_TAG)-$(GIT_BRANCH).sha.$(GIT_COMMIT) - SEMVERSIONS += $(SEMVERSION_BRANCH_COMMIT) + ## Version based on branch and long commit. ex.: 0.3.1-master.sha.80b9f6f5b965555e406b9db066a8e16cb1075e5f + SEMVERSION_BRANCH_COMMIT = $(GIT_LATEST_TAG)-$(GIT_BRANCH).sha.$(GIT_COMMIT) + SEMVERSIONS += $(SEMVERSION_BRANCH_COMMIT) endif ## Use as default version first of possible versions diff --git a/modules/stages/Makefile b/modules/stages/Makefile index 2bef26b9..89157e26 100644 --- a/modules/stages/Makefile +++ b/modules/stages/Makefile @@ -1,15 +1,15 @@ FEATURE_PATTERN ?= "^feature-\d*" ifeq ($(GIT_IS_TAG),1) - FEATURE ?= $(GIT_LATEST_TAG) + FEATURE ?= $(GIT_LATEST_TAG) endif ifeq ($(GIT_IS_BRANCH),1) - ifneq ($(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN)),) - FEATURE ?= $(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN)) - else - FEATURE ?= "$(GIT_BRANCH)" - endif + ifneq ($(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN)),) + FEATURE ?= $(shell echo $(GIT_BRANCH) | grep -Po $(FEATURE_PATTERN)) + else + FEATURE ?= "$(GIT_BRANCH)" + endif endif ## Export stages vars