Skip to content

Commit

Permalink
Updates to specification build ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtclarke committed Aug 7, 2021
1 parent 71c32d4 commit 26d2526
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/zenodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ def deposit(zenodo_url, access_token, dep_id, upload_file, meta):

print("New deposition ID: {}".format(dep_id))

# Delete previous files (all current)
# Get list of files
url = '{}/{}/files'.format(urlbase, dep_id)
r = requests.get(url, params=params)
if r.status_code != 200:
raise RuntimeError('GET {} failed: {}'.format(url, r.status_code))
print(f'Existing files: {r.json()}')

for files in r.json():
url = '{}/{}/files/{}'.format(urlbase, dep_id, files['id'])
r = requests.delete(url, params=params)

# Upload the file
data = {'filename': op.basename(upload_file)}
files = {'file': open(upload_file, 'rb')}
Expand Down
4 changes: 2 additions & 2 deletions build_specification/build_specification_pdf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
version=`git tag`
echo "${version/./_}"
pandoc specification.MD -t html -o - | pandoc -f html --pdf-engine=xelatex -V geometry:margin=1in -V mainfont:Roboto -o "nifti_mrs_specification_${version/./_}.pdf"
echo "${version//./_}"
pandoc specification.MD -t html -o - | pandoc -f html --pdf-engine=xelatex -V geometry:margin=1in -V mainfont:Roboto -o "nifti_mrs_specification_${version//./_}.pdf"

0 comments on commit 26d2526

Please sign in to comment.