Skip to content

Commit 233ab08

Browse files
committed
update publish
Signed-off-by: Dan Selman <danscode@selman.org>
1 parent deafdee commit 233ab08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/timestamp.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ dayjs.extend(utc);
2323

2424
const timestamp = dayjs.utc().format('YYYYMMDDHHmmss');
2525

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;
26+
const rootDir = path.resolve('.');
27+
const configFile = path.resolve(rootDir, 'package.json');
28+
const config = require(configFile);
29+
config.version.replace(/-.*/, '');
30+
const targetVersion = semver.inc(config.version, 'patch') + '-' + timestamp;
3131
console.log(`::set-output name=stamp::${targetVersion}`);

0 commit comments

Comments
 (0)