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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -6,3 +6,5 @@ services:
volumes:
- ../scripts:/home/circleci/scripts
- ../install:/home/circleci/install
- ${HOME}/.ssh:/root/.ssh
- ../../..:/home/circleci/grafana-toolkit

View File

@ -1,4 +1,10 @@
#!/bin/bash
function finish {
echo "Exiting and cleaning up docker image"
docker-compose down
}
trap finish EXIT
# Enter the docker container
docker-compose run citest bash -c "cd /home/circleci; exec bash --login -i"

View File

@ -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) {