git package - add keepGitDir option

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville
2021-07-06 11:49:47 +02:00
parent f8531fdb0b
commit cbcb198dce
2 changed files with 30 additions and 11 deletions

View File

@@ -11,19 +11,25 @@ import (
#Repository: {
// Git remote.
// Example: `"https://github.com/dagger/dagger"`
remote: string @dagger(input)
remote: string & dagger.#Input
// Git ref: can be a commit, tag or branch.
// Example: "main"
ref: string @dagger(input)
ref: string & dagger.#Input
// (optional) Subdirectory
subdir: string | *null @dagger(input)
subdir: *null | string & dagger.#Input
// (optional) Keep .git directory
keepGitDir: *false | bool
#up: [
op.#FetchGit & {
"remote": remote
"ref": ref
if (keepGitDir) {
keepGitDir: true
}
},
if subdir != null {
op.#Subdir & {