![Eric Crosson](/assets/img/avatar_default.png)
This commit adds support for parsing multiple parameters to both `ADD` and `COPY` commands. For example, tree-sitter-dockerfile now correctly parses both of these lines from the dockerfile reference[^1]: ```dockerfile ADD --chown=myuser:mygroup --chmod=655 files* /somedir/ COPY --chown=myuser:mygroup --chmod=644 files* /somedir/ ``` Closes #43 [^1]: https://docs.docker.com/engine/reference/builder/
56 lines
589 B
Plaintext
56 lines
589 B
Plaintext
==================
|
|
No param
|
|
==================
|
|
|
|
ADD /src ./dst
|
|
|
|
---
|
|
|
|
(source_file
|
|
(add_instruction
|
|
(path)
|
|
(path)))
|
|
|
|
==================
|
|
With param
|
|
==================
|
|
|
|
ADD --chown=a:b /src ./dst
|
|
|
|
---
|
|
|
|
(source_file
|
|
(add_instruction
|
|
(param)
|
|
(path)
|
|
(path)))
|
|
|
|
==================
|
|
Multiple files
|
|
==================
|
|
|
|
ADD src1 src2 dst
|
|
|
|
---
|
|
|
|
(source_file
|
|
(add_instruction
|
|
(path)
|
|
(path)
|
|
(path)))
|
|
|
|
==================
|
|
Multiple params
|
|
==================
|
|
|
|
ADD --chown=a:b --chmod=644 src dst
|
|
|
|
---
|
|
|
|
(source_file
|
|
(add_instruction
|
|
(param)
|
|
(param)
|
|
(path)
|
|
(path)))
|