summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-08 22:27:13 +0800
committerruki <[email protected]>2023-08-08 22:27:13 +0800
commit6eb5d22f95a757581ce61d45eed015ef4f7da436 (patch)
tree47e950e98d7526b7abe8493687395da5d2db7259
parente8dbb835082d8ace3558ea7b0ba908512e3848b0 (diff)
update xmake.sh
-rwxr-xr-xconfigure10
m---------core/src/tbox/tbox0
2 files changed, 9 insertions, 1 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
-Subproject 3f6eae269a25d73d5c6cc29f992dfd671ca30ca
+Subproject 2e0cac8bae7a8bc921114b1e482fefd8f8a5d55