Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
singularity on pypi), and the versions here will coincide with these releases.

## [master](https://github.com/singularityhub/singularity-cli/tree/master)
- continued lines should not be split in docker.py recipe parser (_setup) (0.0.49)
- COPY command should honor src src dest (and not reverse) (0.0.48)
- adding support for instance list (0.0.47)
- ENV variables in Dockerfile can be empty (like unsetting) (0.0.46)
Expand Down
25 changes: 5 additions & 20 deletions spython/main/parse/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def _setup(self, action, line):
bot.debug('[in] %s' % line)

# Replace ACTION at beginning
line = re.sub('^%s' %action, '', line)
line = re.sub('^%s' % action, '', line)

# Handle continuation lines without ACTION by padding with leading space
line = " " + line

# Split into components
return [x for x in self._split_line(line) if x not in ['', None]]
Expand Down Expand Up @@ -372,25 +375,7 @@ def _label(self, line):
self.labels += [ label ]


# Main Parsing Functions


def _split_line(self, line):
'''clean a line to prepare it for parsing, meaning separation
of the Docker command (e.g., RUN) from the remainder. We remove
newlines (from ends) along with extra spaces.

Parameters
==========
line: the string to parse into parts

Returns
=======
parts: a list of line pieces, the command is likely first

'''
return [x.strip() for x in line.split(' ', 1)]

# Main Parsing Functions


def _get_mapping(self, line, parser=None, previous=None):
Expand Down
2 changes: 1 addition & 1 deletion spython/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@



__version__ = "0.0.48"
__version__ = "0.0.49"
AUTHOR = 'Vanessa Sochat'
AUTHOR_EMAIL = 'vsochat@stanford.edu'
NAME = 'spython'
Expand Down