From e3524c90de918d0b4a74d70768175561758f0d70 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 28 Nov 2016 23:24:27 -0800 Subject: scripts: Make archive build reproducible We used to use the current timestamp when building the archive; switch to using the timestamp of the tag with the version we're packaging. This requires some monkey patching since tarfile module is always using current timestamp when writing gzip header... Also exclude archive.py from archive and simplify release file list in Makefile. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 84290c7..13eb1cb 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp)) EXECUTABLE=$(BUILD)/test VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp) -RELEASE=$(shell git ls-files src docs/*.html docs/*.css docs/samples docs/images scripts contrib CMakeLists.txt readme.txt) +RELEASE=$(filter-out scripts/archive.py docs/%.adoc,$(shell git ls-files contrib docs scripts src CMakeLists.txt readme.txt)) CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast LDFLAGS= @@ -82,7 +82,7 @@ docs: docs/quickstart.html docs/manual.html build/pugixml-%: .FORCE | $(RELEASE) @mkdir -p $(BUILD) - python scripts/archive.py $@ pugixml-$(VERSION) $| + TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $| $(EXECUTABLE): $(OBJECTS) $(CXX) $(OBJECTS) $(LDFLAGS) -o $@ -- cgit v1.2.3