mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: use last commit timestamp for @next builds (#4876)
This commit is contained in:
parent
b0b1561c92
commit
706c1e44d1
@ -17,6 +17,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const SCRIPT_NAME = path.basename(__filename);
|
||||
const USAGE = `
|
||||
@ -48,7 +49,10 @@ if (version === '--next') {
|
||||
version = packageJSON.version;
|
||||
if (!version.includes('-'))
|
||||
version += '-next';
|
||||
version += '.' + Date.now();
|
||||
const timestamp = execSync('git show -s --format=%ct HEAD', {
|
||||
stdio: ['ignore', 'pipe', 'ignore']
|
||||
}).toString('utf8').trim() + '000';
|
||||
version += '.' + timestamp;
|
||||
console.log('Setting version to ' + version);
|
||||
} else {
|
||||
if (!version || !version.match(/^v\d+\.\d+\.\d+(-next)?$/)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user