summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorOto Šťáva <oto.stava@gmail.com>2024-02-16 16:28:10 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2024-02-20 20:57:53 +0100
commit1e93208bd2c605704b19fe8b04025c20c17e808d (patch)
tree41d04bda3d5cc9d226d3517bbf95ddabbbbc3bf2 /scripts
parentae036c26fd4365b55ac4037e443650094c03aa02 (diff)
downloadopenwrt-1e93208bd2c605704b19fe8b04025c20c17e808d.tar.gz
openwrt-1e93208bd2c605704b19fe8b04025c20c17e808d.tar.bz2
openwrt-1e93208bd2c605704b19fe8b04025c20c17e808d.zip
build: add explicit --no-show-signature for git
When `log.showSignature` is set, it causes the `SOURCE_DATE_EPOCH` to include a textual signature description on OpenPGP-signed commits, because Git prints the description into stdout. This then causes some scripts to fail because they cannot parse the date from the variable. Adding an explicit `--no-show-signature` prevents the signatures from being displayed even when one has Git configured to show them by default, fixing the scripts. Signed-off-by: Oto Šťáva <oto.stava@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get_source_date_epoch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/get_source_date_epoch.sh b/scripts/get_source_date_epoch.sh
index d122acf385..727cb0372b 100755
--- a/scripts/get_source_date_epoch.sh
+++ b/scripts/get_source_date_epoch.sh
@@ -15,8 +15,8 @@ try_version() {
}
try_git() {
- SOURCE_DATE_EPOCH=$(git -C "$SOURCE" log -1 --format=format:%ct \
- "$SOURCE" 2>/dev/null)
+ SOURCE_DATE_EPOCH=$(git -C "$SOURCE" log -1 --no-show-signature \
+ --format=format:%ct "$SOURCE" 2>/dev/null)
[ -n "$SOURCE_DATE_EPOCH" ]
}