From f0d8a16dba83c3a7265703651e65cfadb77f8cde Mon Sep 17 00:00:00 2001 From: Yifeng Wang Date: Wed, 6 Dec 2023 21:58:37 +0800 Subject: [PATCH] chore: optimize format --- src/version.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/version.ts b/src/version.ts index 18ce2f6..662d68e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -8,10 +8,9 @@ export function samver(): string { date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), - date.getUTCSeconds(), ]; const displayTime = timestamp .map((_) => _.toString().padStart(2, '0')) .join(''); - return [displayTime, git.commitHash(true)].join('-'); + return [displayTime, git.commitHash(true).slice(0, 7)].join('-'); }