Skip to content

Commit f5e4b68

Browse files
fix: non-git users can build devlake (#7995) (#7996)
Co-authored-by: abeizn <zikuan.an@merico.dev>
1 parent b34d525 commit f5e4b68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# https://stackoverflow.com/questions/920413/make-error-missing-separator
1818
# https://tutorialedge.net/golang/makefiles-for-go-developers/
1919

20-
SHA ?= $(shell git show -s --format=%h)
21-
TAG ?= $(shell git tag --points-at HEAD)
20+
SHA := $(shell if [ -d .git ]; then git show -s --format=%h; else echo "default_SHA"; fi)
21+
TAG := $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo "default_TAG"; fi)
2222
IMAGE_REPO ?= "apache"
2323
VERSION = $(TAG)@$(SHA)
2424

backend/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# https://stackoverflow.com/questions/920413/make-error-missing-separator
1818
# https://tutorialedge.net/golang/makefiles-for-go-developers/
1919

20-
SHA ?= $(shell git show -s --format=%h)
21-
TAG ?= $(shell git tag --points-at HEAD)
20+
SHA := $(shell if [ -d .git ]; then git show -s --format=%h; else echo "default_SHA"; fi)
21+
TAG := $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo "default_TAG"; fi)
2222
IMAGE_REPO ?= "apache"
2323
VERSION = $(TAG)@$(SHA)
2424
PYTHON_DIR ?= "./python"

0 commit comments

Comments
 (0)