feat: add option to specify subdirectory in repo to use

This commit is contained in:
Jef Roosens 2022-12-16 11:21:28 +01:00
parent a48358fd75
commit 1ce7b9d571
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
14 changed files with 120 additions and 28 deletions

View file

@ -28,21 +28,24 @@ pub mut:
repo string [nonull]
// Cron schedule describing how frequently to build the repo.
schedule string
// Subdirectory in the Git repository to cd into
path string
// On which architectures the package is allowed to be built. In reality,
// this controls which builders will periodically build the image.
// this controls which agents will build this package when scheduled.
arch []TargetArch [fkey: 'target_id']
}
// str returns a string representation.
pub fn (gr &Target) str() string {
pub fn (t &Target) str() string {
mut parts := [
'id: $gr.id',
'kind: $gr.kind',
'url: $gr.url',
'branch: $gr.branch',
'repo: $gr.repo',
'schedule: $gr.schedule',
'arch: ${gr.arch.map(it.value).join(', ')}',
'id: $t.id',
'kind: $t.kind',
'url: $t.url',
'branch: $t.branch',
'path: $t.path',
'repo: $t.repo',
'schedule: $t.schedule',
'arch: ${t.arch.map(it.value).join(', ')}',
]
str := parts.join('\n')