From 429392e6041fd5777c9a5a437f6455bca0fe3ed8 Mon Sep 17 00:00:00 2001 From: "Stefan K. Berg" Date: Tue, 15 Dec 2015 15:57:46 +0100 Subject: Fix for cache handling Introduced a separate function "getcommitid" in the cache.sh - a.k.a. $(CACHETOOL) - so that given a repo and a tag, branch or commitid the corresponding commitid is returned. The same principle should be used in all caching functions where not a strict tag or head is specified (as git ls-remote will not be able to figure out the commit id in those cases). Change-Id: I3540dca7ab408c872eaabdc68d4058f9d6d7c45f Signed-off-by: Stefan K. Berg --- build/f_isoroot/f_bgpvpn-pluginbuild/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build/f_isoroot') diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile index 443a8e39c..3da8d38b9 100644 --- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile +++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile @@ -61,7 +61,11 @@ release:.bgpvpnbuild # - The SHA1 hash of the HEAD on the plugin repo's $(BGPVPN_BRANCH) # - The contents of this Makefile .cacheid: - git ls-remote --heads $(BGPVPN_REPO) | grep $(BGPVPN_BRANCH) > .cachedata + if [ ! -z $(BGPVPN_CHANGE) ]; then \ + $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_CHANGE) > .cachedata; \ + else \ + $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_BRANCH) > .cachedata; \ + fi sha1sum Makefile >> .cachedata sha1sum config.mk >> .cachedata cat .cachedata | $(CACHETOOL) getid > .cacheid -- cgit 1.2.3-korg