Dagger
Search

archive

No long description provided.

Installation

dagger install github.com/sagikazarmark/daggerverse/archive@1b1721e459afc1423c9fb9f56454cc59c1f4c9ee

Entrypoint

Return Type
Archive
Example
func (m *myModule) example() *Archive  {
	return dag.
			Archive()
}
@function
def example() -> dag.Archive:
	return (
		dag.archive()
	)
@func()
example(): Archive {
	return dag
		.archive()
}

Types

Archive 🔗

create() 🔗

Create an archive from a directory of files.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
nameString !-File name without extension.
sourceDirectory !-The directory to archive.
formatString -Archive format. (choices: "auto", "tar.gz", "zip") (default "auto") "auto" will attempt to choose the best format. If platform is specified and the platform is Windows, "zip" will be used. Otherwise, "tar.gz" will be used.
platformString -Target platform in "[os]/[platform]/[version]" format (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
Example
func (m *myModule) example(name string, source *Directory) *File  {
	return dag.
			Archive().
			Create(name, source)
}
@function
def example(name: str, source: dagger.Directory) -> dagger.File:
	return (
		dag.archive()
		.create(name, source)
	)
@func()
example(name: string, source: Directory): File {
	return dag
		.archive()
		.create(name, source)
}