Skip to content

feat: allow passing git files on dagger cli - #6769

Merged
jedevc merged 2 commits into
dagger:mainfrom
jedevc:cli-git-file
Mar 4, 2024
Merged

jedevc merged 2 commits into
dagger:mainfrom
jedevc:cli-git-file

Conversation

@jedevc

@jedevc jedevc commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

As suggested by @helderco in #6744 (review).

This brings it inline with how you can currently pass git directories.

Usage:

dagger call thing --file https://github.com/dagger/dagger.git#main:README.md

Or with an implicit branch:

dagger call thing --file https://github.com/dagger/dagger.git#:README.md

This brings it inline with how you can currently pass git directories.

Usage:

	dagger call thing --file https://github.com/dagger/dagger.git#main:README.md

Or with an implicit branch:

	dagger call thing --file https://github.com/dagger/dagger.git#:README.md

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc
jedevc requested review from helderco and sipsma February 28, 2024 12:15

@gerhard gerhard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a nice improvement to me 👍

@helderco helderco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Does the dir flag have tests?

Comment thread cmd/dagger/flags.go
}

func (v *fileValue) Get(_ context.Context, c *dagger.Client) (any, error) {
func (v *fileValue) Get(_ context.Context, dag *dagger.Client) (any, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't need to pass the Client instance arround anymore! (not now)

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc jedevc added this to the v0.10.1 milestone Mar 4, 2024
@jedevc
jedevc merged commit 7744610 into dagger:main Mar 4, 2024
@jedevc
jedevc deleted the cli-git-file branch March 4, 2024 12:33
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