This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v1.0 by this push:
     new f5e4b6808 fix: non-git users can build devlake (#7995) (#7996)
f5e4b6808 is described below

commit f5e4b6808c10c09e930f6f1001753c829c2d8110
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 6 10:03:55 2024 +0800

    fix: non-git users can build devlake (#7995) (#7996)
    
    Co-authored-by: abeizn <[email protected]>
---
 Makefile         | 4 ++--
 backend/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 1d51ff69d..2721ab5e2 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,8 @@
 # https://stackoverflow.com/questions/920413/make-error-missing-separator
 # https://tutorialedge.net/golang/makefiles-for-go-developers/
 
-SHA ?= $(shell git show -s --format=%h)
-TAG ?= $(shell git tag --points-at HEAD)
+SHA := $(shell if [ -d .git ]; then git show -s --format=%h; else echo 
"default_SHA"; fi)
+TAG := $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo 
"default_TAG"; fi)
 IMAGE_REPO ?= "apache"
 VERSION = $(TAG)@$(SHA)
 
diff --git a/backend/Makefile b/backend/Makefile
index 30807416c..bb321473c 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -17,8 +17,8 @@
 # https://stackoverflow.com/questions/920413/make-error-missing-separator
 # https://tutorialedge.net/golang/makefiles-for-go-developers/
 
-SHA ?= $(shell git show -s --format=%h)
-TAG ?= $(shell git tag --points-at HEAD)
+SHA := $(shell if [ -d .git ]; then git show -s --format=%h; else echo 
"default_SHA"; fi)
+TAG := $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo 
"default_TAG"; fi)
 IMAGE_REPO ?= "apache"
 VERSION = $(TAG)@$(SHA)
 PYTHON_DIR ?= "./python"

Reply via email to