repopack
This module provides a function to execute the repopack CLI toolwithin a Dagger pipeline. repopack is a utility that packs a repository
or specific files/directories into a single file for easy sharing or analysis.
The Run function executes repopack with various options, allowing
for flexible processing of repositories, files, and directories. It can be called from
the Dagger CLI or from one of the SDKs.
Installation
dagger install github.com/staticaland/daggers/repopack@5b864c01d9290ec82c4b43e1af115fe09c710c3e
Entrypoint
Return Type
Repopack
Example
dagger -m github.com/staticaland/daggers/repopack@5b864c01d9290ec82c4b43e1af115fe09c710c3e call \
func (m *myModule) example() *Repopack {
return dag.
Repopack()
}
@function
def example() -> dag.Repopack:
return (
dag.repopack()
)
@func()
example(): Repopack {
return dag
.repopack()
}
Types
Repopack 🔗
run() 🔗
Run executes the repopack CLI command
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | The directory containing the repository to process |
include | [String ! ] | - | Specify patterns to include (can be used multiple times) |
ignore | [String ! ] | - | Specify patterns to ignore (can be used multiple times) |
remote | String | - | The remote repository URL to pack |
init | Boolean | - | Initialize a new configuration file (repopack.config.json) |
output | String | - | The output file path (if not specified, output will be returned as a string) |
path | String | - | The path to directory to process. If not specified, the source directory will be used |
style | String | - | The style of the output (e.g., "xml") |
Example
dagger -m github.com/staticaland/daggers/repopack@5b864c01d9290ec82c4b43e1af115fe09c710c3e call \
run --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Repopack().
Run(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.repopack()
.run(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.repopack()
.run(source)
}