Learnings from latest automated git publish. Small tweaks (#23440)

This commit is contained in:
Stephanie Closson
2020-04-08 09:22:36 -06:00
committed by GitHub
parent 008bee8f27
commit 242db64158
3 changed files with 13 additions and 3 deletions
@@ -69,10 +69,11 @@ const prepareRelease = useSpinner<any>('Preparing release', async ({ dryrun, ver
['git', ['config', 'user.email', DEFAULT_EMAIL_ADDRESS]],
['git', ['config', 'user.name', DEFAULT_USERNAME]],
await checkoutBranch(`release-${pluginJson.info.version}`),
['cp', ['-rf', distContentDir, 'dist']],
['git', ['add', '--force', distDir], { dryrun }],
['/bin/rm', ['-rf', 'dist'], { dryrun }],
['mv', ['-v', distContentDir, 'dist']],
['git', ['add', '--force', 'dist'], { dryrun }],
['/bin/rm', ['-rf', 'src'], { enterprise: true }],
['git', ['rm', '-rf', 'src'], { enterprise: true }],
[
'git',
['commit', '-m', `automated release ${pluginJson.info.version} [skip ci]`],
@@ -81,8 +82,9 @@ const prepareRelease = useSpinner<any>('Preparing release', async ({ dryrun, ver
okOnError: [/nothing to commit/g, /nothing added to commit/g, /no changes added to commit/g],
},
],
['git', ['tag', '-f', pluginJson.info.version]],
['git', ['push', '-f', 'origin', `release-${pluginJson.info.version}`], { dryrun }],
['git', ['tag', '-f', `v${pluginJson.info.version}`]],
['git', ['push', '-f', 'origin', `v${pluginJson.info.version}`]],
];
for (let line of githubPublishScript) {