From 6eb5d22f95a757581ce61d45eed015ef4f7da436 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 8 Aug 2023 22:27:13 +0800 Subject: update xmake.sh --- configure | 10 +++++++++- core/src/tbox/tbox | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 70cdb3676..532e7a273 100755 --- a/configure +++ b/configure @@ -253,8 +253,16 @@ _os_find() { } # get date, "%Y%m%d%H%M" -> 202212072222 +# Use deterministic timestamp from SOURCE_DATE_EPOCH if available +# https://reproducible-builds.org/docs/source-date-epoch/ _os_date() { - _ret=$(date +"${1}") + if test_z "${SOURCE_DATE_EPOCH}"; then + _ret=$(date +"${1}") + elif is_host "macosx"; then + _ret=$(date -u -r "$SOURCE_DATE_EPOCH" +"${1}") + else + _ret=$(date -u -d "@$SOURCE_DATE_EPOCH" +"${1}") + fi } # we avoid use `basename`, because it's slow diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox index 3f6eae269..2e0cac8ba 160000 --- a/core/src/tbox/tbox +++ b/core/src/tbox/tbox @@ -1 +1 @@ -Subproject commit 3f6eae269a25d73d5c6cc29f992dfd671ca30cad +Subproject commit 2e0cac8bae7a8bc921114b1e482fefd8f8a5d55e -- cgit v1.3.1