diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f331e3dfa..65d745c2e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,8 +122,7 @@ build-job: - PLATFORMS=linux/amd64 - THREADS=8 - DOCKER_TAG=ci-${CI_PIPELINE_IID}-${CI_COMMIT_SHA} - - make include/vg_git_version.hpp - - cat include/vg_git_version.hpp + - make version # Connect so we can upload our images - docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}" # Note that A LOCAL CACHE CAN ONLY HOLD ONE TAG/TARGET AT A TIME! @@ -165,7 +164,7 @@ production-build-job: - THREADS=8 # Oversubscribe since the ARM build will take way longer anyway. # Determine what we should be tagging vg Dockers as. If we're running on a Git tag we want to use that. Otherwise push over the tag we made already. - if [[ ! -z "${CI_COMMIT_TAG}" ]]; then DOCKER_TAG="${CI_COMMIT_TAG}" ; else DOCKER_TAG="ci-${CI_PIPELINE_IID}-${CI_COMMIT_SHA}"; fi - - make include/vg_git_version.hpp + - make version # Make sure ARM emulation is available. - if [[ "${CI_BUILDKIT_DRIVER}" != "kubernetes" ]] ; then docker run --privileged --rm tonistiigi/binfmt --install all || true ; fi # TODO: deduplicate this code with normal build above diff --git a/Makefile b/Makefile index a32bbfea8a..c0becd6407 100644 --- a/Makefile +++ b/Makefile @@ -904,7 +904,7 @@ $(shell echo "#define VG_COMPILER_VERSION \"$(shell $(CXX) --version 2>/dev/null $(shell echo "#define VG_OS \"$(shell uname)\"" >> $(SRC_DIR)/vg_environment_version.hpp.tmp) $(shell echo "#define VG_BUILD_USER \"$(shell whoami)\"" >> $(SRC_DIR)/vg_environment_version.hpp.tmp) $(shell echo "#define VG_BUILD_HOST \"$(shell hostname)\"" >> $(SRC_DIR)/vg_environment_version.hpp.tmp) -$(shell diff $(SRC_DIR)/vg_environment_version.hpp.tmp $(SRC_DIR)/vg_environment_version.hpp >/dev/null || cp $(SRC_DIR)/vg_environment_version.hpp.tmp $(SRC_DIR)/vg_environment_version.hpp) +$(shell diff $(SRC_DIR)/vg_environment_version.hpp.tmp $(SRC_DIR)/vg_environment_version.hpp >/dev/null 2>/dev/null || cp $(SRC_DIR)/vg_environment_version.hpp.tmp $(SRC_DIR)/vg_environment_version.hpp) $(shell rm -f $(SRC_DIR)/vg_environment_version.hpp.tmp) ###################################