This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 7cc6c0491 fix: empty version (#6474)
7cc6c0491 is described below
commit 7cc6c0491b12765f8b8bffd733d749f89c87ae04
Author: Klesh Wong <[email protected]>
AuthorDate: Thu Nov 16 14:08:16 2023 +0800
fix: empty version (#6474)
---
backend/Makefile | 4 ++--
backend/scripts/build-server.sh | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/Makefile b/backend/Makefile
index 208f9b437..4ff7cc7c9 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -17,7 +17,7 @@
# https://stackoverflow.com/questions/920413/make-error-missing-separator
# https://tutorialedge.net/golang/makefiles-for-go-developers/
-SHA = $(shell git show -s --format=%h)
+SHA ?= $(shell git show -s --format=%h)
TAG ?= $(shell git tag --points-at HEAD)
IMAGE_REPO ?= "apache"
VERSION = $(TAG)@$(SHA)
@@ -44,7 +44,7 @@ build-plugin:
scripts/build-plugins.sh
build-server: swag
- scripts/build-server.sh
+ VERSION=$(VERSION) scripts/build-server.sh
build-python: #don't mix this with the other build commands
scripts/build-python.sh
diff --git a/backend/scripts/build-server.sh b/backend/scripts/build-server.sh
index ff340cd57..4944ac1dd 100755
--- a/backend/scripts/build-server.sh
+++ b/backend/scripts/build-server.sh
@@ -17,6 +17,8 @@
set -e
+echo build-server.sh VERSION: $VERSION
+
ROOT_DIR=$(dirname $(dirname "$0"))
VERSION=${VERSION:-$(git describe --tags --always --dirty || true)}
EXTRA=""