Initial part of repos API (SEGFAULTS) [CI SKIP]

This commit is contained in:
Jef Roosens 2022-02-21 22:22:36 +01:00
parent 92ad0c51eb
commit e13252d368
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
10 changed files with 150 additions and 39 deletions

View file

@ -6,7 +6,7 @@ import rand
import time
import os
import json
import git
import server
import env
const container_build_dir = '/build'
@ -17,7 +17,7 @@ fn build() ? {
// Read in the repos from a json file
filename := os.join_path_single(conf.repo_dir, 'repos.json')
txt := os.read_file(filename) ?
repos := json.decode([]git.GitRepo, txt) ?
repos := json.decode([]server.GitRepo, txt) ?
mut commands := [
// Update repos & install required packages