We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deafdee commit 233ab08Copy full SHA for 233ab08
scripts/timestamp.js
@@ -23,9 +23,9 @@ dayjs.extend(utc);
23
24
const timestamp = dayjs.utc().format('YYYYMMDDHHmmss');
25
26
-const lernaDirectory = path.resolve('.');
27
-const lernaConfigFile = path.resolve(lernaDirectory, 'lerna.json');
28
-const lernaConfig = require(lernaConfigFile);
29
-lernaConfig.version.replace(/-.*/, '');
30
-const targetVersion = semver.inc(lernaConfig.version, 'patch') + '-' + timestamp;
+const rootDir = path.resolve('.');
+const configFile = path.resolve(rootDir, 'package.json');
+const config = require(configFile);
+config.version.replace(/-.*/, '');
+const targetVersion = semver.inc(config.version, 'patch') + '-' + timestamp;
31
console.log(`::set-output name=stamp::${targetVersion}`);
0 commit comments