refactor: ran formatter
ci/woodpecker/pr/docs Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/docker Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details

Jef Roosens 2022-05-16 22:02:24 +02:00
parent 447aa6071d
commit 2c4b948a94
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,7 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db
build_arch := os.uname().machine build_arch := os.uname().machine
repo_url := "$address/$repo.repo" repo_url := '$address/$repo.repo'
// TODO what to do with PKGBUILDs that build multiple packages? // TODO what to do with PKGBUILDs that build multiple packages?
commands := [ commands := [
@ -111,9 +111,9 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db
"echo -e '[$repo.repo]\nServer = $address/\$repo/\$arch\nSigLevel = Optional' >> /etc/pacman.conf" "echo -e '[$repo.repo]\nServer = $address/\$repo/\$arch\nSigLevel = Optional' >> /etc/pacman.conf"
// We need to update the package list of the repo we just added above. // We need to update the package list of the repo we just added above.
// This should however not pull in a lot of packages as long as the // This should however not pull in a lot of packages as long as the
// builder image is rebuild frequently. // builder image is rebuilt frequently.
'pacman -Syu --needed --noconfirm' 'pacman -Syu --needed --noconfirm',
'su builder' 'su builder',
'git clone --single-branch --depth 1 --branch $repo.branch $repo.url repo', 'git clone --single-branch --depth 1 --branch $repo.branch $repo.url repo',
'cd repo', 'cd repo',
'makepkg --nobuild --syncdeps --needed --noconfirm', 'makepkg --nobuild --syncdeps --needed --noconfirm',
@ -134,7 +134,7 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db
entrypoint: ['/bin/sh', '-c'] entrypoint: ['/bin/sh', '-c']
cmd: ['echo \$BUILD_SCRIPT | base64 -d | /bin/bash -e'] cmd: ['echo \$BUILD_SCRIPT | base64 -d | /bin/bash -e']
work_dir: '/build' work_dir: '/build'
/* user: 'builder:builder' */ // user: 'builder:builder'
} }
id := dd.create_container(c)?.id id := dd.create_container(c)?.id