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

Use hash code for project git description

parent 754fc9f2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
GIT_REMOTE_NAME := $(shell git remote | head -n 1)
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_DESC="$(shell 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_URL="$(shell git config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null | sed 's%^https://[^@]*@%https://%')"
else
......
......@@ -486,7 +486,7 @@ export CFG
# These variables are written into a .yaml file in the installed module directory to keep track of
# metadata for which module was compiled.
${PRJ}_GIT_DESC := $(shell git describe --tags HEAD 2> /dev/null || git rev-parse HEAD 2> /dev/null)
${PRJ}_GIT_DESC := $(shell git rev-parse HEAD 2> /dev/null)
export ${PRJ}_GIT_DESC
# 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/$$/\\\", /')]
......
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