Skip to content

Commit

Permalink
Fix output path [GEAR-440] (#5)
Browse files Browse the repository at this point in the history
* remove extension from output path
* add release drafter
* update manifest version, cleanup
  • Loading branch information
NPann authored May 29, 2020
1 parent 0a8e161 commit 09ac9aa
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- 'enh'
- title: 'Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Documentation'
labels:
- 'doc'
- 'documentation'
- title: 'Maintenance'
labels:
- 'chore'
- 'maintenance'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
_[ADD SUMMARY OF WHAT CHANGED]_
# What's Changed
$CHANGES
# Impact On Gear Output
_[LIST HOW STRUCTURE AND/OR VALUES OF GEAR OUTPUTS (e.g. FILES AND METADATA) ARE IMPACTED]_
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
"license": "Other",
"source": "https://github.com/flywheel-apps/fsl-anat",
"url": "https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/fsl_anat",
"version": "1.1.1_6.0.1",
"version": "1.1.2_6.0.1",
"custom": {
"gear-builder": {
"category": "analysis",
"image": "flywheel/fsl-anat:1.1.1_6.0.1"
"image": "flywheel/fsl-anat:1.1.2_6.0.1"
},
"docker-image": "flywheel/fsl-anat:1.1.1_6.0.1",
"flywheel": {
"suite": "FSL"
}
Expand Down
6 changes: 5 additions & 1 deletion utils/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def build(context):
input_file_basename = re.sub('[^0-9a-zA-Z./]+', '_',
context.get_input("Image")['location']['name']
)
context.custom_dict['input_file_basename']=input_file_basename
if input_file_basename.endswith('.nii.gz'):
input_file_basename = input_file_basename.replace('.nii.gz', '')
if input_file_basename.endswith('.nii'):
input_file_basename = input_file_basename.replace('.nii', '')
context.custom_dict['input_file_basename'] = input_file_basename
result_dir = input_file_basename + '_result'
context.custom_dict['result_dir']=result_dir
params['o'] = op.join(context.work_dir, result_dir)
Expand Down

0 comments on commit 09ac9aa

Please sign in to comment.