$(REPOINFO) -r . > gitinfo_bgpvpnplugin.txt
rm -rf fuel-plugin-bgpvpn
touch .bgpvpnbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
# - 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