diff --git a/npm/ng-packs/lerna.exec.json b/npm/ng-packs/lerna.exec.json new file mode 100644 index 0000000000..cbd3bc3ed3 --- /dev/null +++ b/npm/ng-packs/lerna.exec.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "packages": ["dist/*"], + "npmClient": "yarn" +} diff --git a/npm/ng-packs/lerna.json b/npm/ng-packs/lerna.json deleted file mode 100644 index e6e8e09739..0000000000 --- a/npm/ng-packs/lerna.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": "1.1.1", - "packages": [ - "packages/*" - ], - "npmClient": "yarn" -} diff --git a/npm/ng-packs/lerna.version.json b/npm/ng-packs/lerna.version.json new file mode 100644 index 0000000000..19681c270c --- /dev/null +++ b/npm/ng-packs/lerna.version.json @@ -0,0 +1,5 @@ +{ + "version": "1.1.0", + "packages": ["packages/*"], + "npmClient": "yarn" +} diff --git a/npm/ng-packs/scripts/publish.js b/npm/ng-packs/scripts/publish.js index 7fa53f51e5..084b84e99c 100644 --- a/npm/ng-packs/scripts/publish.js +++ b/npm/ng-packs/scripts/publish.js @@ -1,12 +1,13 @@ // ESM syntax is supported. import execa from 'execa'; +import fse from 'fs-extra'; const versions = ['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']; let nextSemanticVersion = (process.argv[2] || '').toLowerCase(); if (versions.indexOf(nextSemanticVersion) < 0) { console.log( - "Please enter the next semantic version like this: 'npm run publish patch'. Available versions: " + + "Please enter the next semantic version like this: 'npm run publish patch'. Available versions:\n " + JSON.stringify(versions), ); @@ -16,6 +17,16 @@ if (versions.indexOf(nextSemanticVersion) < 0) { (async () => { try { await execa('yarn', ['install-new-dependencies'], { stdout: 'inherit' }); + + await fse.rename('../lerna.version.json', '../lerna.json'); + + await execa( + 'yarn', + ['lerna', 'version', nextSemanticVersion, '--yes', '--no-commit-hooks', '--skip-git'], + { stdout: 'inherit', cwd: '../' }, + ); + + await fse.rename('../lerna.json', '../lerna.version.json'); } catch (error) { console.error(error.stderr); process.exit(1);