We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 840e7a1 commit 810f425Copy full SHA for 810f425
porch/Makefile
@@ -28,7 +28,16 @@ MODULES = \
28
# GCP project to use for development
29
export GCP_PROJECT_ID ?= $(shell gcloud config get-value project)
30
export IMAGE_REPO ?= gcr.io/$(GCP_PROJECT_ID)
31
-export IMAGE_TAG ?= latest
+export IMAGE_TAG
32
+ifndef IMAGE_TAG
33
+ git_tag := $(shell git rev-parse --short HEAD || "latest" )
34
+ $(shell git diff --quiet)
35
+ ifneq ($(.SHELLSTATUS), 0)
36
+ git_tag := $(git_tag)-dirty
37
+ endif
38
+
39
+ IMAGE_TAG=$(git_tag)
40
+endif
41
42
PORCH_SERVER_IMAGE ?= porch-server
43
PORCH_FUNCTION_RUNNER_IMAGE ?= porch-function-runner
0 commit comments