Skip to content

feat: add context directory module#4

Merged
TomChv merged 2 commits into
dagger:mainfrom
TomChv:feat/context-directory-git-module
Oct 8, 2024
Merged

feat: add context directory module#4
TomChv merged 2 commits into
dagger:mainfrom
TomChv:feat/context-directory-git-module

Conversation

@TomChv
Copy link
Copy Markdown
Member

@TomChv TomChv commented Sep 25, 2024

No description provided.

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
@TomChv TomChv self-assigned this Sep 25, 2024
Copy link
Copy Markdown
Contributor

@jedevc jedevc left a comment

Choose a reason for hiding this comment

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

LGTM, cc @grouville - can we also mirror these changes when merged to the other repos we have?

Comment thread context-dir/src/main.go
Comment on lines +9 to +21
func (m *Test) AbsolutePath(
// +defaultPath="/"
dir *dagger.Directory,
) *dagger.Directory {
return dir
}

func (m *Test) RelativePath(
// +defaultPath="."
dir *dagger.Directory,
) *dagger.Directory {
return dir
}
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.

Can we also get some sub-paths? Something like /data and ./data, so we can check the differences between those as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I mean, / will point to the root of the repo while . will point to the current dir so we can already do some further queries in our test to get a specific dir

like dagger call absolute-path directory --path "context-dir" & dagger call relative-path directory --path "src"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So should I still add new method?

Copy link
Copy Markdown
Contributor

@jedevc jedevc Sep 25, 2024

Choose a reason for hiding this comment

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

I think it would be good to have a couple of new methods, and put some content there, just so we can check that the path joining logic is all correct in the tests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see, alright

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changes done

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
@TomChv TomChv requested a review from jedevc September 25, 2024 15:43
@TomChv
Copy link
Copy Markdown
Member Author

TomChv commented Oct 8, 2024

@jedevc Still waiting for your approval on that one :D

@TomChv TomChv merged commit 323d56c into dagger:main Oct 8, 2024
@TomChv TomChv deleted the feat/context-directory-git-module branch October 8, 2024 10:54
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.

2 participants