This is an automated email from the ASF dual-hosted git repository. DemesneGH pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/teaclave-trustzone-sdk.git
commit 35141c50975239c3ba40dbf623188c35ae51693f Author: ivila <[email protected]> AuthorDate: Fri May 22 14:46:04 2026 +0800 scripts: fix stat command compatibility for Linux in release script Move the MTIME assignment inside the platform-specific branches: use stat -f on macOS and stat -c with date on Linux, since the original stat -f syntax is macOS-only. --- scripts/release/make_release_artifacts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/release/make_release_artifacts.sh b/scripts/release/make_release_artifacts.sh index fe72775..8ef86ce 100755 --- a/scripts/release/make_release_artifacts.sh +++ b/scripts/release/make_release_artifacts.sh @@ -106,16 +106,17 @@ case "$1" in mv "${REPO_NAME}-${RELEASE_VERSION}-rc.${RC_NUMBER}" "${TAR_TOP_DIR_NAME}" echo "[INFO] Normalizing tarball metadata..." - MTIME=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M:%S" "${TAR_TOP_DIR_NAME}/LICENSE") # On macOS, use gnu-tar if [[ $(uname) == "Darwin" ]]; then + MTIME=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M:%S" "${TAR_TOP_DIR_NAME}/LICENSE") if ! command -v gtar &> /dev/null; then echo "[ERROR] GNU tar (gtar) is required. Please run: brew install gnu-tar" exit 1 fi TAR_CMD=gtar else + MTIME=$(date -d "$(stat -c %y "${TAR_TOP_DIR_NAME}/LICENSE")" "+%Y-%m-%d %H:%M:%S") TAR_CMD=tar fi --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
