Skip to content

Commit bbe25c0

Browse files
Merge pull request #14444 from lukebakken/lukebakken/fix-package-build
Ensure that file modified time is set correctly
2 parents 5fb6ca6 + 993322f commit bbe25c0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ $(1): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
189189
$${gen_verbose} $${RSYNC} $(2) ./ $$@/
190190
$${verbose} echo "$(PROJECT_DESCRIPTION) $(PROJECT_VERSION)" > $$@/git-revisions.txt
191191
$${verbose} echo "$(PROJECT) $$$$(git rev-parse HEAD) $$$$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)" >> $$@/git-revisions.txt
192-
$${verbose} echo "$$$$(TZ= git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')" > $$@.git-times.txt
192+
$${verbose} echo "$$$$(TZ=UTC git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')" > $$@.git-times.txt
193193
$${verbose} cat packaging/common/LICENSE.head > $$@/LICENSE
194194
$${verbose} mkdir -p $$@/deps/licensing
195195
$${verbose} set -e; for dep in $$$$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | LC_COLLATE=C sort); do \
@@ -216,8 +216,7 @@ $(1): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
216216
echo "$$$$(basename "$$$$dep") $$$$(git rev-parse HEAD) $$$$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)") \
217217
>> "$$@/git-revisions.txt"; \
218218
! test -d $$$$dep/.git || (cd $$$$dep; \
219-
echo "$$$$(env TZ= git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')") \
220-
>> "$$@.git-times.txt"; \
219+
echo "$$$$(TZ=UTC git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')") >> "$$@.git-times.txt"; \
221220
done
222221
$${verbose} cat packaging/common/LICENSE.tail >> $$@/LICENSE
223222
$${verbose} find $$@/deps/licensing -name 'LICENSE-*' -exec cp '{}' $$@ \;
@@ -231,7 +230,7 @@ $(1): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
231230
done
232231
$${verbose} echo "PLUGINS := $(PLUGINS)" > $$@/plugins.mk
233232
$${verbose} sort -r < "$$@.git-times.txt" | head -n 1 > "$$@.git-time.txt"
234-
$${verbose} find $$@ -print0 | xargs -0 touch -t "$$$$(cat $$@.git-time.txt)"
233+
$${verbose} find $$@ -print0 | (TZ=UTC xargs -0 touch -t "$$$$(cat $$@.git-time.txt)")
235234
$${verbose} rm "$$@.git-times.txt" "$$@.git-time.txt"
236235

237236
$(1).manifest: $(1)

0 commit comments

Comments
 (0)