Skip to content

Commit 6e1776d

Browse files
Use portable release timestamps (#6)
1 parent daf7397 commit 6e1776d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/build-release.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const version = packageManifest.version
1010
const tag = `v${version}`
1111
const ref = process.env.CODETRUSS_PLUGIN_RELEASE_REF || 'HEAD'
1212
const dist = join(root, 'dist')
13-
const commitDate = execFileSync('git', ['show', '-s', '--format=%cI', `${ref}^{commit}`], {
13+
const commitTimestamp = execFileSync('git', ['show', '-s', '--format=%ct', `${ref}^{commit}`], {
1414
cwd: root,
1515
encoding: 'utf8',
1616
}).trim()
@@ -57,7 +57,7 @@ for (const [target, tree] of packages) {
5757
execFileSync('git', [
5858
'archive',
5959
'--format=zip',
60-
`--mtime=${commitDate}`,
60+
`--mtime=@${commitTimestamp}`,
6161
`--output=${output}`,
6262
`${ref}:${tree}`,
6363
], {

0 commit comments

Comments
 (0)