Skip to content

CLI: support git URLs as directory arguments - #6058

Merged
sipsma merged 4 commits into
dagger:mainfrom
shykes:zenith-directory-args
Nov 4, 2023
Merged

sipsma merged 4 commits into
dagger:mainfrom
shykes:zenith-directory-args

Conversation

@shykes

@shykes shykes commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

Support values include:

  • ./mydir
  • file://mydir
  • Various url schemes for git remote: git://, ssh://, https://, git+ssh://, git+https://
  • Encode git ref in URL fragment (defaults to main): https://github.com/dagger/dagger#v0.9.2
  • Not yet supported: tarball-over-https
  • Not yet supported: interpret local dir as a git repo, by encoding a git ref in the fragment, eg. file://.#main

@shykes

shykes commented Nov 3, 2023

Copy link
Copy Markdown
Contributor Author

I would love to add information about supported formats in the --help output, but I don't know how to do that...

@helderco

helderco commented Nov 3, 2023 •

Copy link
Copy Markdown
Contributor

I would love to add information about supported formats in the --help output, but I don't know how to do that...

We can add a method to DaggerValue for that so it gets appended to the usage (which comes from the argument's description) in AddFlag (GetCustomFlagValue). That would show in every flag that uses that type, though. To make a separate section in --help dedicated to this we'd have to customize the help template for it.

@sipsma
sipsma merged commit 85fff7d into dagger:main Nov 4, 2023
@sipsma sipsma added this to the v0.9.3 milestone Nov 4, 2023
schlapzz pushed a commit to schlapzz/dagger that referenced this pull request Nov 24, 2023
* CLI: support git URLs as directory arguments

Signed-off-by: Solomon Hykes <[email protected]>

* use gitutil parser + add test coverage

Signed-off-by: Erik Sipsma <[email protected]>

* fix docs for module git format

Signed-off-by: Erik Sipsma <[email protected]>

* use ssh auth socket in git directory args if set

Signed-off-by: Erik Sipsma <[email protected]>

---------

Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Co-authored-by: Erik Sipsma <[email protected]>
Signed-off-by: Christian Schlatter <[email protected]>
schlapzz pushed a commit to schlapzz/dagger that referenced this pull request Nov 24, 2023
* CLI: support git URLs as directory arguments

Signed-off-by: Solomon Hykes <[email protected]>

* use gitutil parser + add test coverage

Signed-off-by: Erik Sipsma <[email protected]>

* fix docs for module git format

Signed-off-by: Erik Sipsma <[email protected]>

* use ssh auth socket in git directory args if set

Signed-off-by: Erik Sipsma <[email protected]>

---------

Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Co-authored-by: Erik Sipsma <[email protected]>
schlapzz pushed a commit to schlapzz/dagger that referenced this pull request Nov 24, 2023
* CLI: support git URLs as directory arguments

Signed-off-by: Solomon Hykes <[email protected]>

* use gitutil parser + add test coverage

Signed-off-by: Erik Sipsma <[email protected]>

* fix docs for module git format

Signed-off-by: Erik Sipsma <[email protected]>

* use ssh auth socket in git directory args if set

Signed-off-by: Erik Sipsma <[email protected]>

---------

Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Co-authored-by: Erik Sipsma <[email protected]>
schlapzz pushed a commit to schlapzz/dagger that referenced this pull request Nov 24, 2023
* CLI: support git URLs as directory arguments

Signed-off-by: Solomon Hykes <[email protected]>

* use gitutil parser + add test coverage

Signed-off-by: Erik Sipsma <[email protected]>

* fix docs for module git format

Signed-off-by: Erik Sipsma <[email protected]>

* use ssh auth socket in git directory args if set

Signed-off-by: Erik Sipsma <[email protected]>

---------

Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Co-authored-by: Erik Sipsma <[email protected]>
schlapzz pushed a commit to schlapzz/dagger that referenced this pull request Nov 24, 2023
* CLI: support git URLs as directory arguments

Signed-off-by: Solomon Hykes <[email protected]>

* use gitutil parser + add test coverage

Signed-off-by: Erik Sipsma <[email protected]>

* fix docs for module git format

Signed-off-by: Erik Sipsma <[email protected]>

* use ssh auth socket in git directory args if set

Signed-off-by: Erik Sipsma <[email protected]>

---------

Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Co-authored-by: Erik Sipsma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants