From 01ea5827b28f9b26c7f167d05450ebe77ea3940a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 23 Sep 2018 09:37:04 +0200 Subject: [PATCH] Added COMMIT_TIMESTAMP_ISO_8601 as a Makefile parameter --- Makefile | 13 +++++++++---- appveyor.yml | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index fd93411..55e8177 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,22 @@ +#################################### +# Makefile configuration variables # +OS_FILENAME = os.bat +BUILD_DIR = build +COMMIT_TIMESTAMP_ISO_8601 = $$(git log -1 --pretty=format:%ad --date=iso8601-strict) +#################################### + MAKEFLAGS = --warn-undefined-variables SHELL = bash -euET -o pipefail -c .SECONDEXPANSION: -OS_FILENAME = os.bat os_filename = ${OS_FILENAME} -BUILD_DIR = build bld = ${BUILD_DIR} tests_emu = test/qemu-system-i386-floppy test/qemu-system-i386-cdrom test/qemu-system-arm test/virtualbox test/bochs test/gui-sh test/dosbox tests_requiring_sudo = test/fat12_mount test/iso_mount tests_noemu = test/zip test/os.reasm test/sizes test/fat12_contents test/reproducible_build -commit_timestamp = "$$(git log -1 --pretty=format:%ad --date=format:"%Y%m%d%H%m.%S")" -commit_faketime = "$$(git log -1 --pretty=format:%ad --date=format:"%Y-%m-%d %H:%m:%S")" +commit_timestamp = "$$(date -d "${COMMIT_TIMESTAMP_ISO_8601}" '+%Y%m%d%H%m.%S')" +commit_faketime = "$$(date -d "${COMMIT_TIMESTAMP_ISO_8601}" '+%Y-%m-%d %H:%m:%S')" offset_names = bytes_os_size \ bytes_mbr_start \ diff --git a/appveyor.yml b/appveyor.yml index 786a59a..5aa9f8f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -57,7 +57,7 @@ install: - cmd: echo TODO install gnu make and dependencies build_script: - - cmd: make all + - cmd: make COMMIT_TIMESTAMP_ISO_8601="%APPVEYOR_REPO_COMMIT_TIMESTAMP%" all test_script: - cmd: cmd /C os.bat exit