Skip to content

Commit 9dfca68

Browse files
committed
scripts: 0-pad release tags
1 parent 28b6d51 commit 9dfca68

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/create-release-tag.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ async function main() {
3535
const octokit = new Octokit({ auth: GITHUB_TOKEN });
3636

3737
const date = new Date();
38-
const baseTagName = `release-${date.getUTCFullYear()}-${
39-
date.getUTCMonth() + 1
40-
}-${date.getUTCDate()}`;
38+
const yyyy = date.getUTCFullYear();
39+
const mm = String(date.getUTCMonth() + 1).padStart(2, '0');
40+
const dd = String(date.getUTCDate()).padStart(2, '0');
41+
const baseTagName = `release-${yyyy}-${mm}-${dd}`;
4142

4243
console.log('Requesting existing tags');
4344

0 commit comments

Comments
 (0)