From 14afd2e9a928befc6fac8f181a7a84403ac5beb7 Mon Sep 17 00:00:00 2001 From: Andrew Sichevoi Date: Thu, 31 May 2018 14:36:01 +0300 Subject: [PATCH] fix: build during 'version_autogen.go' generation on complex origins. '^' is used for delimeter for sed instead of '@' --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b2ee6b0..07e8d33 100644 --- a/Makefile +++ b/Makefile @@ -35,11 +35,11 @@ _version_file: _build_dir @echo - Collecting build version details $(eval GIT_ORIGIN:=$(shell git config --get remote.origin.url || (echo -n local/; git rev-parse --abbrev-ref HEAD) )) - @sed -i -e 's@%BUILD_GIT_ORIGIN%@${GIT_ORIGIN}@g' ${BUILD_VERSION_FN} + @sed -i -e 's^%BUILD_GIT_ORIGIN%^${GIT_ORIGIN}^g' ${BUILD_VERSION_FN} $(eval GIT_COMMIT:=$(shell git log -1 --format=%h)) - @sed -i -e 's@%BUILD_GIT_COMMIT%@${GIT_COMMIT}@g' ${BUILD_VERSION_FN} + @sed -i -e 's^%BUILD_GIT_COMMIT%^${GIT_COMMIT}^g' ${BUILD_VERSION_FN} $(eval BUILD_DATE:=$(shell date +%s)) - @sed -i -e 's@%BUILD_DATE%@${BUILD_DATE}@g' ${BUILD_VERSION_FN} + @sed -i -e 's^%BUILD_DATE%^${BUILD_DATE}^g' ${BUILD_VERSION_FN} @echo - Build version ORIGIN: ${GIT_ORIGIN}, COMMIT: ${GIT_COMMIT}, DATE: ${BUILD_DATE} @ln -sf ${BUILD_VERSION_FN} ./${VERSION_AUTOGEN_FN} -- 2.20.1