Commit 242db641 by Stephanie Closson Committed by GitHub

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

parent 008bee8f
......@@ -6,3 +6,5 @@ services:
volumes:
- ../scripts:/home/circleci/scripts
- ../install:/home/circleci/install
- ${HOME}/.ssh:/root/.ssh
- ../../..:/home/circleci/grafana-toolkit
#!/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"
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment