wip [CI SKIP]
ci/woodpecker/pr/test Pipeline is pending Details
ci/woodpecker/pr/lint Pipeline failed Details
ci/woodpecker/pr/docker unknown status Details
ci/woodpecker/pr/man unknown status Details
ci/woodpecker/pr/docs Pipeline failed Details
ci/woodpecker/pr/build Pipeline failed Details

Jef Roosens 2022-12-16 18:18:25 +01:00
parent af4c9e1d00
commit e2331159d6
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 5 additions and 5 deletions

View File

@ -33,9 +33,9 @@ pub fn (m &ImageManager) get(base_image string) string {
return m.images[base_image].last()
}
// up_to_date returns whether the last known builder image is exists and is up
// to date. If this function returns true, the last builder image may be used
// to perform a build.
// up_to_date returns true if the last known builder image exists and is up to
// date. If this function returns true, the last builder image may be used to
// perform a build.
pub fn (mut m ImageManager) up_to_date(base_image string) bool {
if base_image !in m.timestamps
|| m.timestamps[base_image].add_seconds(m.max_image_age) <= time.now() {
@ -67,7 +67,7 @@ pub fn (mut m ImageManager) up_to_date(base_image string) bool {
}
// refresh_image builds a new builder image from the given base image. This
// function should only be called if `up_to_date` return false.
// function should only be called if `up_to_date` returned false.
fn (mut m ImageManager) refresh_image(base_image string) ! {
// TODO use better image tags for built images
new_image := build.create_build_image(base_image) or {

View File

@ -57,7 +57,7 @@ fn (c &Client) send_request<T>(method Method, url string, params map[string]stri
// output as a Response<T> object.
fn (c &Client) send_request_with_body<T>(method Method, url string, params map[string]string, body string) !Response<T> {
res := c.send_request_raw(method, url, params, body)!
status := http.status_from_int(res.status_code)
status := res.status()
// Just return an empty successful response
if status.is_success() && res.body == '' {