diff --git a/.woodpecker/.arch.yml b/.woodpecker/.arch.yml index 93c9840..6b8f8f2 100644 --- a/.woodpecker/.arch.yml +++ b/.woodpecker/.arch.yml @@ -23,7 +23,7 @@ pipeline: - su builder # Due to a bug with the V compiler, we can't just use the PKGBUILD from # inside the repo - - curl -OL https://git.rustybever.be/Chewing_Bever/vieter/raw/branch/dev/PKGBUILD + - curl -OL https://git.rustybever.be/vieter/vieter/raw/branch/dev/PKGBUILD - makepkg -s --noconfirm --needed when: event: push diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index a3b66ea..1698129 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -12,7 +12,7 @@ pipeline: commands: - make when: - event: [push, pull_request] + event: [pull_request] branch: exclude: [main] diff --git a/.woodpecker/.lint.yml b/.woodpecker/.lint.yml index b13aea4..e70648d 100644 --- a/.woodpecker/.lint.yml +++ b/.woodpecker/.lint.yml @@ -10,4 +10,4 @@ pipeline: commands: - make lint when: - event: [ push, pull_request ] + event: [ pull_request ] diff --git a/.woodpecker/.test.yml b/.woodpecker/.test.yml index 0337570..6b7b646 100644 --- a/.woodpecker/.test.yml +++ b/.woodpecker/.test.yml @@ -14,4 +14,4 @@ pipeline: commands: - make test when: - event: [push, pull_request] + event: [pull_request] diff --git a/PKGBUILD b/PKGBUILD index eb86683..87c575f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,12 +4,12 @@ pkgbase='vieter' pkgname='vieter' pkgver=0.2.0.r25.g20112b8 pkgrel=1 -depends=('glibc' 'openssl' 'libarchive' 'gc') +depends=('glibc' 'openssl' 'libarchive' 'gc' 'sqlite') makedepends=('git' 'gcc' 'vieter-v') -arch=('x86_64' 'aarch64' 'armv7') -url='https://git.rustybever.be/Chewing_Bever/vieter' +arch=('x86_64' 'aarch64') +url='https://git.rustybever.be/vieter/vieter' license=('AGPL3') -source=($pkgname::git+https://git.rustybever.be/Chewing_Bever/vieter#branch=dev) +source=($pkgname::git+https://git.rustybever.be/vieter/vieter#branch=dev) md5sums=('SKIP') pkgver() { diff --git a/src/cron/daemon/daemon.v b/src/cron/daemon/daemon.v index 35cca5f..ffa2f6e 100644 --- a/src/cron/daemon/daemon.v +++ b/src/cron/daemon/daemon.v @@ -9,6 +9,7 @@ import math import build import docker import db +import os const ( // How many seconds to wait before retrying to update API if failed @@ -19,7 +20,6 @@ const ( struct ScheduledBuild { pub: - repo_id string repo db.GitRepo timestamp time.Time } @@ -187,6 +187,10 @@ fn (mut d Daemon) renew_repos() { return } + // Filter out any repos that shouldn't run on this architecture + cur_arch := os.uname().machine + new_repos = new_repos.filter(it.arch.any(it.value == cur_arch)) + d.repos = new_repos d.api_update_timestamp = time.now().add_seconds(60 * d.api_update_frequency)