Skip to content
Snippets Groups Projects
Commit 754fc9f2 authored by Juntong Liu's avatar Juntong Liu
Browse files

Fix tag fetching issue of e3 modules

parent 32c7d650
No related branches found
No related tags found
1 merge request!81E3-768: Fix tag fetching issue of e3 modules
...@@ -13,7 +13,7 @@ E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEMODS_PATH="$(E3_SITEMODS_PATH)" ...@@ -13,7 +13,7 @@ E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEMODS_PATH="$(E3_SITEMODS_PATH)"
ifeq ($(shell git status > /dev/null 2>&1; echo $$?),0) ifeq ($(shell git status > /dev/null 2>&1; echo $$?),0)
GIT_REMOTE_NAME := $(shell git remote | head -n 1) GIT_REMOTE_NAME := $(shell git remote | head -n 1)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC="$(shell git describe --tags 2> /dev/null || git rev-parse HEAD 2> /dev/null || echo 'Not a git repository')" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC="$(shell git describe --tags HEAD 2> /dev/null || git rev-parse HEAD 2> /dev/null || echo 'Not a git repository')"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_STATUS="[ $(shell git status --porcelain | sed 's/^/\\\\\\\"/' | sed 's/$$/\\\\\\\", /')]" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_STATUS="[ $(shell git status --porcelain | sed 's/^/\\\\\\\"/' | sed 's/$$/\\\\\\\", /')]"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL="$(shell git config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null | sed 's%^https://[^@]*@%https://%')" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL="$(shell git config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null | sed 's%^https://[^@]*@%https://%')"
else else
......
...@@ -486,7 +486,7 @@ export CFG ...@@ -486,7 +486,7 @@ export CFG
# These variables are written into a .yaml file in the installed module directory to keep track of # These variables are written into a .yaml file in the installed module directory to keep track of
# metadata for which module was compiled. # metadata for which module was compiled.
${PRJ}_GIT_DESC := $(shell git describe --tags 2> /dev/null || git rev-parse HEAD 2> /dev/null) ${PRJ}_GIT_DESC := $(shell git describe --tags HEAD 2> /dev/null || git rev-parse HEAD 2> /dev/null)
export ${PRJ}_GIT_DESC export ${PRJ}_GIT_DESC
# The formatting here is just to make sure this is properly parseable .yaml data # The formatting here is just to make sure this is properly parseable .yaml data
${PRJ}_GIT_STATUS := [ $(shell git status --porcelain 2> /dev/null | grep -v "\.Makefile" | sed 's/^/\\\"/' | sed 's/$$/\\\", /')] ${PRJ}_GIT_STATUS := [ $(shell git status --porcelain 2> /dev/null | grep -v "\.Makefile" | sed 's/^/\\\"/' | sed 's/$$/\\\", /')]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment