Set version with make

This commit is contained in:
stefanprodan
2019-08-06 15:59:39 +03:00
parent eb0ad32655
commit 0ca7c25d68
4 changed files with 16 additions and 5 deletions
+12 -1
View File
@@ -2,6 +2,7 @@
#
# The release version is controlled from pkg/version
TAG?=latest
NAME:=podinfo
DOCKER_REPOSITORY:=stefanprodan
DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME)
@@ -28,4 +29,14 @@ build-container:
push-container:
docker push $(DOCKER_IMAGE_NAME):$(VERSION)
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
docker push quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
docker push quay.io/$(DOCKER_IMAGE_NAME):$(VERSION)
version-set:
@next="$(TAG)" && \
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \
sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \
echo "Version $$next set in code, deployment, chart and kustomize"
+2 -2
View File
@@ -1,6 +1,6 @@
apiVersion: v1
version: 1.7.0
appVersion: 1.7.1
version: 2.0.0-beta.1
appVersion: 2.0.0-beta.1
name: podinfo
engine: gotpl
description: Podinfo Helm chart for Kubernetes
+1 -1
View File
@@ -12,7 +12,7 @@ faults:
image:
repository: quay.io/stefanprodan/podinfo
tag: 1.7.1
tag: 2.0.0-beta.1
pullPolicy: IfNotPresent
service:
+1 -1
View File
@@ -1,4 +1,4 @@
package version
var VERSION = "2.0.0-alpha.1"
var VERSION = "2.0.0-beta.1"
var REVISION = "unknown"