Commit 51a7d5b9 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'bf/update-manifest' into 'master'

CI: Run checkout in tempdir

See merge request fsl/conda/installer!7
parents 843f8266 6872363c
...@@ -60,19 +60,20 @@ def update_manifest(version): ...@@ -60,19 +60,20 @@ def update_manifest(version):
def checkout_and_update_manifest(server, token, tag, base_branch): def checkout_and_update_manifest(server, token, tag, base_branch):
manifest_url = gen_repository_url(MANIFEST_PATH, server, token) manifest_url = gen_repository_url(MANIFEST_PATH, server, token)
branch = f'mnt/installer-{tag}' branch = f'mnt/{base_branch}/installer-{tag}'
branch = gen_branch_name(branch, MANIFEST_PATH, server, token) branch = gen_branch_name(branch, MANIFEST_PATH, server, token)
msg = COMMIT_MSG.format(tag) msg = COMMIT_MSG.format(tag)
sprun(f'git clone {manifest_url} manifest')
with tempdir():
with indir('manifest'): sprun(f'git clone {manifest_url} manifest')
sprun(f'git config user.name {USERNAME}') with indir('manifest'):
sprun(f'git config user.email {EMAIL}') sprun(f'git config user.name {USERNAME}')
sprun(f'git checkout -b {branch} {base_branch}') sprun(f'git config user.email {EMAIL}')
update_manifest(tag) sprun(f'git checkout -b {branch} {base_branch}')
sprun( 'git add *') update_manifest(tag)
sprun(f'git commit -m "{msg}"') sprun( 'git add *')
sprun(f'git push origin {branch}') sprun(f'git commit -m "{msg}"')
sprun(f'git push origin {branch}')
return branch return branch
......
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