Skip to content

Commit

Permalink
Strip quotes from version numbers when comparing container tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Mar 28, 2018
1 parent 4773254 commit adb2f6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.DS_Store

.coverage
.pytest_cache

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
8 changes: 4 additions & 4 deletions nf_core/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def check_version_consistency(self):
versions = {}
# Get the version definitions
# Get version from nextflow.config
versions['pipeline'] = self.config['params.version'].strip()
versions['params.version'] = self.config['params.version'].strip(' \'"')

# Get version from the docker slug
if self.config.get('params.container') and \
Expand All @@ -372,13 +372,13 @@ def check_version_consistency(self):

# Get config container slugs, (if set; one container per workflow)
if self.config.get('params.container'):
versions['params_container'] = self.config['params.container'].strip().split(':')[-1]
versions['params.container'] = self.config['params.container'].strip(' \'"').split(':')[-1]
if self.config.get('process.container'):
versions['process_container'] = self.config['process.container'].strip().split(':')[-1]
versions['process.container'] = self.config['process.container'].strip(' \'"').split(':')[-1]

# Get version from the TRAVIS_TAG env var
if os.environ.get('TRAVIS_TAG'):
versions['travis_tag'] = os.environ.get('TRAVIS_TAG').strip()
versions['TRAVIS_TAG'] = os.environ.get('TRAVIS_TAG').strip(' \'"')

# Check if they are all numeric
for v_type, version in versions.items():
Expand Down

0 comments on commit adb2f6f

Please sign in to comment.