mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
devops: switch to ISO date string for Canary versions (#29142)
Fixes https://github.com/microsoft/playwright/issues/28906
This commit is contained in:
parent
0752f0202f
commit
d50479a76f
@ -34,11 +34,8 @@ if (process.argv[2] === '--alpha') {
|
|||||||
|
|
||||||
let newVersion;
|
let newVersion;
|
||||||
if (process.argv[3] === '--today-date') {
|
if (process.argv[3] === '--today-date') {
|
||||||
const date = new Date();
|
const isoDate = new Date().toISOString().split('T')[0];
|
||||||
const month = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'][date.getMonth()];
|
newVersion = `${baseVersion}-${prefix}-${isoDate}`;
|
||||||
const day = date.getDate();
|
|
||||||
const year = date.getFullYear();
|
|
||||||
newVersion = `${baseVersion}-${prefix}-${month}-${day}-${year}`;
|
|
||||||
} else if (process.argv[3] === '--commit-timestamp') {
|
} else if (process.argv[3] === '--commit-timestamp') {
|
||||||
const timestamp = execSync('git show -s --format=%ct HEAD', {
|
const timestamp = execSync('git show -s --format=%ct HEAD', {
|
||||||
stdio: ['ignore', 'pipe', 'ignore']
|
stdio: ['ignore', 'pipe', 'ignore']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user