Commit graph

80 commits

Author SHA1 Message Date
Camden Cheek 868e44ce37
bump version number
Some checks failed
Publish packages / npm (push) Has been cancelled
Publish packages / crates (push) Has been cancelled
Publish packages / pypi (push) Has been cancelled
2024-05-09 10:18:45 -04:00
Camden Cheek a16b6d231d
generate and bump version 2024-05-09 10:14:14 -04:00
Camden Cheek 439c3e7b8a
use extra to allow comments anywhere 2024-04-19 15:28:09 -06:00
Camden Cheek b4a90e2b98
remove unused args 2024-04-19 15:20:04 -06:00
Camden Cheek 40eceeff30
allow space after backslash to act as line continuation (#49) 2024-04-19 15:02:25 -06:00
Camden Cheek ecea7ac2c9
allow port ranges 2024-04-19 14:46:59 -06:00
Camden Cheek cde2a8ea7f
add publish workflow 2024-04-19 14:35:33 -06:00
Camden Cheek c4c8fd83f5
Configure CI (#41) 2024-04-19 14:20:33 -06:00
tvrinssen 1bf9daef46
Support heredocs (#45)
This adds support for heredocs in Dockerfiles. This required adding an external scanner to store the required state.

Co-authored-by: Camden Cheek <camden@ccheek.com>
2024-04-19 14:08:28 -06:00
Camden Cheek 33e22c33bc
Merge pull request #44 from EricCrosson/43-support-multiple-parameters-to-add-and-copy
support multiple parameters to ADD and COPY
2023-10-10 11:42:39 -05:00
Eric Crosson c9351d9009 support multiple parameters to ADD and COPY
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/
2023-10-09 18:40:56 -05:00
Camden Cheek 1800d5a067
bump tree-sitter-cli version 2023-09-28 09:05:26 -06:00
Camden Cheek 15c087dc95
Merge pull request #39 from kmicklas/quoted-label-keys
Support quoted LABEL keys
2023-09-27 16:37:17 -05:00
Ken Micklas 0ddac88c66 Regenerate 2023-09-27 19:35:30 +01:00
Ken Micklas 3fbd45ef0b Support quoted LABEL keys 2023-09-27 19:35:26 +01:00
Camden Cheek c0a9d694d9
Merge pull request #37 from returntocorp/mj-single-quoted-strings
Distinguish 3 kinds of quoted strings (single, double, JSON)
2023-07-06 08:25:44 -06:00
Martin Jambon 2a43a1c184 Regenerate 2023-06-23 14:55:54 -07:00
Martin Jambon bd355ef2d1 Produce CST nodes for the different kinds of JSON string fragments 2023-06-23 14:54:29 -07:00
Martin Jambon d36d825a07 Set up config for 'tree-sitter highlight' and update highlight rules for strings 2023-06-23 14:12:34 -07:00
Martin Jambon 71fe2fd68b Don't mark lone backslashes as escape sequences 2023-06-23 13:12:10 -07:00
Martin Jambon 98fdcad2a0 Add support for single-quoted strings and distinguish JSON strings from
the double-quoted strings that support variable expansion.
2023-06-22 19:44:07 -07:00
Camden Cheek fd30df68c4
Merge pull request #35 from Quitlox/34-capital-in-user-error
Fix error if USER username/group contains capital
2023-05-02 20:19:31 -06:00
Kevin Witlox dd30de55fb Fix error if USER username/group contains capital 2023-05-02 20:54:19 +02:00
Camden Cheek 8ee3a0f758
Merge pull request #28 from returntocorp/mj-run-param
Support options after RUN
2023-02-21 21:09:31 -07:00
Martin Jambon 771fccc7ec Regenerate 2023-02-21 14:40:46 -08:00
Martin Jambon 3b6aaf2303 Merge branch 'main' into mj-run-param 2023-02-21 14:39:57 -08:00
Camden Cheek 09e316dba3
Merge pull request #29 from mattmassicotte/feature/spm
SPM support
2022-12-03 14:21:21 -07:00
Matt 76452728fc
SPM support 2022-12-03 07:44:28 -05:00
Camden Cheek f913be9bb8
Merge pull request #25 from mattmassicotte/feature/make
Makefile
2022-11-05 10:22:31 -06:00
Camden Cheek e808beaf1f
Merge pull request #23 from marciomazza/variables-can-start-or-end-with-underscores
Allow variables to begin or end with underscores
2022-11-05 10:20:01 -06:00
Martin Jambon 7490273613 Add support for options after RUN 2022-10-25 19:48:10 -07:00
Matt 1258425143
Makefile 2022-09-29 08:12:12 -04:00
Marcio Mazza 4e512c60ef Allow variables to begin or end with underscores 2022-09-13 20:27:53 -03:00
Camden Cheek 25c71d6a24
Merge pull request #20 from returntocorp/sticky-tokens
Disallow whitespace in some multi-fragment constructs.
2022-04-05 11:19:43 -06:00
Martin Jambon 1c0b92971c Regenerate 2022-04-04 19:10:55 -07:00
Martin Jambon d8defd6796 Disallow whitespace in some multi-fragment constructs.
This is more correct and more robust when rules are reordered, see
https://github.com/camdencheek/tree-sitter-dockerfile/issues/18 and
https://github.com/camdencheek/tree-sitter-dockerfile/issues/19
2022-04-04 19:08:03 -07:00
Camden Cheek 189b6b1f86
Merge pull request #17 from camdencheek/cc/allow-numeric-users-groups
allow numeric users and groups
2022-03-07 11:05:02 -07:00
Camden Cheek 71ac1e8880
allow numeric users and groups
Previously, users and groups were set to only allow alphabetical first
characters.
2022-03-07 11:02:36 -07:00
Camden Cheek d34a0cebd0
allow one-letter environment variables
This fixes issue #11. Previously, we required environment variable names
to be one ASCII letter followed by one or more characters, but this
makes the following characters optional.
2022-01-27 11:20:14 -07:00
Camden Cheek 4e5f9a0a61
Merge pull request #14 from returntocorp/mj-copy-multiple-files
Allow copying multiple files with ADD/COPY
2022-01-27 11:14:35 -07:00
Martin Jambon fbbf542d58 Regenerate 2022-01-26 14:42:39 -08:00
Martin Jambon 47a922db41 Support multiple files in ADD/COPY instructions
Fixes https://github.com/camdencheek/tree-sitter-dockerfile/issues/12
2022-01-26 14:41:32 -08:00
Camden Cheek 28ac8596ba
add optional leading comment to shell_command
Previously, if a shell command started with a comment line, parsing
would fail because shell_command expected the first line to be a shell
line. This adds an optional comment to the beginning of the
shell_command to handle this correctly.
2022-01-23 12:37:35 -07:00
Camden Cheek 98e201aaf7
Merge pull request #9 from theHamsta/fix-repo-links
docs: fix repository URL in Cargo.toml
2022-01-13 18:12:52 -07:00
Camden Cheek 22bdef3e27
Merge pull request #8 from theHamsta/empty-env
fix: allow empty value for env_pair
2022-01-13 18:12:28 -07:00
Stephan Seitz 07c078936e docs: fix repository in Cargo.toml 2022-01-13 09:55:30 +01:00
Stephan Seitz fca82f8774 Update tree-sitter-cli: 0.19.4 -> 0.20.1 2022-01-13 09:53:10 +01:00
Stephan Seitz 44be8fbf72 fix: allow empty value for env_pair 2022-01-12 22:43:34 +01:00
Camden Cheek dd2673d44c
Merge pull request #7 from returntocorp/mj-from-param
Prevent '--platform=xxx' after 'FROM' from being mistaken for the image name
2022-01-05 20:55:06 -07:00
Martin Jambon edb5613f52 Simplify pattern
Co-authored-by: Camden Cheek <camden@ccheek.com>
2022-01-05 15:29:28 -08:00