From 95ae66a1cd0e8dc9c1b194ccedb0469d3fe92a1c Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 12 Jan 2022 16:31:27 +0100 Subject: [PATCH] Some ci config changes --- .woodpecker.yml | 29 +++++++++++++++++++---------- vieter/main.v | 2 +- vieter/web/web.v | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 210ab28b..b3a3b1d4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,11 +1,20 @@ +# pipeline: +# lint: +# image: 'chewingbever/vlang:latest' +# commands: +# - v fmt -verify vieter + +# build: +# image: 'chewingbever/vlang:latest' +# commands: +# - v vieter pipeline: - lint: - image: 'chewingbever/vlang:latest' - commands: - - v fmt -verify vieter - - build: - image: 'chewingbever/vlang:latest' - commands: - - v vieter - + publish: + image: plugins/docker + secrets: [ docker_username, docker_password ] + settings: + repo: chewingbever/vieter + tag: ${CI_COMMIT_TAG} + when: + event: tag + branch: main diff --git a/vieter/main.v b/vieter/main.v index d2c96e47..b974864c 100644 --- a/vieter/main.v +++ b/vieter/main.v @@ -10,7 +10,7 @@ const port = 8000 const buf_size = 1_000_000 -const db_name = 'pieter.db.tar.gz' +const db_name = 'pieter.db' struct App { web.Context diff --git a/vieter/web/web.v b/vieter/web/web.v index 39faaa71..404bd085 100644 --- a/vieter/web/web.v +++ b/vieter/web/web.v @@ -268,7 +268,7 @@ pub fn (mut ctx Context) file(f_path string) Result { return ctx.not_found() } - ext := os.file_ext(f_path) + // ext := os.file_ext(f_path) // data := os.read_file(f_path) or { // eprint(err.msg) // ctx.server_error(500)