Revert "Allow updating npm lockfile v2 with the new version"
This commit is contained in:
parent
9a62f21ac5
commit
18f362b194
|
@ -54,10 +54,6 @@ inputs:
|
||||||
description: 'Set to false to skip pushing the new tag'
|
description: 'Set to false to skip pushing the new tag'
|
||||||
default: 'true'
|
default: 'true'
|
||||||
required: false
|
required: false
|
||||||
bump_package-lock:
|
|
||||||
description: 'Set to false to skip bumping version in lockfile version 2'
|
|
||||||
default: 'true'
|
|
||||||
required: false
|
|
||||||
outputs:
|
outputs:
|
||||||
newTag:
|
newTag:
|
||||||
description: 'The newly created tag'
|
description: 'The newly created tag'
|
||||||
|
|
10
index.js
10
index.js
|
@ -158,16 +158,6 @@ const workspace = process.env.GITHUB_WORKSPACE;
|
||||||
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim().replace(/^v/, '');
|
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim().replace(/^v/, '');
|
||||||
newVersion = `${tagPrefix}${newVersion}`;
|
newVersion = `${tagPrefix}${newVersion}`;
|
||||||
console.log(`::set-output name=newTag::${newVersion}`);
|
console.log(`::set-output name=newTag::${newVersion}`);
|
||||||
|
|
||||||
// case: when user wants to skip updating package-lock.json v2
|
|
||||||
try {
|
|
||||||
if (process.env['INPUT_BUMP_PACKAGE-LOCK'] === 'true') {
|
|
||||||
await runInWorkspace('npm', ['install', '--package-lock-only', '--ignore-scripts'])
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
logError(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// to support "actions/checkout@v1"
|
// to support "actions/checkout@v1"
|
||||||
await runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]);
|
await runInWorkspace('git', ['commit', '-a', '-m', commitMessage.replace(/{{version}}/g, newVersion)]);
|
||||||
|
|
Loading…
Reference in New Issue