Skip to content

Commit

Permalink
fix version #4
Browse files Browse the repository at this point in the history
  • Loading branch information
kuritka committed Nov 6, 2020
1 parent 04f2db4 commit d1edb0c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ NC=\033[0m
# VARIABLES
###############################

# Current Operator version
VERSION ?= $$(helm show chart chart/k8gb/|awk '/appVersion:/ {print $$2}')

# Image URL to use all building/pushing image targets
IMG ?= $(REPO):v$(VERSION)
IMG ?= $(REPO):v`$(call version)`

# Default bundle image tag
BUNDLE_IMG ?= controller-bundle:$(VERSION)
BUNDLE_IMG ?= controller-bundle:`$(call version)`

###############################
# TARGETS
Expand Down Expand Up @@ -95,7 +92,9 @@ deploy-full-terratest-setup:
docker push localhost:5000/k8gb:v`$(call git-last-commit-hash)`
K8GB_IMAGE_REPO=localhost:5000/k8gb
# change version in Chart.yaml
sed -i "s/`helm show chart chart/k8gb/|awk '/appVersion:/ {print $2}'`/`$(call git-last-commit-hash)`/g" chart/k8gb/Chart.yaml

@echo "\n$(YELLOW)Change version in Chart.yaml $(CYAN)`$(call version)` $(NC)"
sed -i "s/`$(call version)`/`$(call git-last-commit-hash)`/g" chart/k8gb/Chart.yaml

$(call deploy-local-cluster,$(CLUSTER_GSLB1),$(CLUSTER_GSLB2),control-plane,)
$(call deploy-local-cluster,$(CLUSTER_GSLB2),$(CLUSTER_GSLB1),control-plane,$(HELM_ARGS))
Expand Down Expand Up @@ -146,7 +145,7 @@ clean-test-apps:

.PHONY: version
version:
$(call version)
@$(call version)

###############################
# FUNCTIONS
Expand Down Expand Up @@ -262,5 +261,5 @@ define git-last-commit-hash
endef

define version
@echo $(VERSION)
helm show chart chart/k8gb/|awk '/appVersion:/ {print $$2}'
endef

0 comments on commit d1edb0c

Please sign in to comment.