push
This commit is contained in:
@@ -24,7 +24,7 @@ pub fn (mut plbook PlayBook) add(args_ PlayBookNewArgs) ! {
|
||||
pull: args.git_pull
|
||||
reset: args.git_reset
|
||||
)!
|
||||
args.path = repo.get_path()!
|
||||
args.path = repo.path()
|
||||
}
|
||||
|
||||
// walk over directory
|
||||
|
||||
@@ -238,7 +238,7 @@ fn (mut self GitStructure) coderoot() !pathlib.Path {
|
||||
////// CONFIG
|
||||
|
||||
// Load config from redis
|
||||
fn (mut self GitStructure) config() !GitStructureConfig {
|
||||
pub fn (mut self GitStructure) config() !GitStructureConfig {
|
||||
mut config := self.config_ or {
|
||||
mut redis := redis_get()
|
||||
data:=redis.get("${self.cache_key()}:config")!
|
||||
|
||||
@@ -58,7 +58,7 @@ pub fn (mut repo GitRepo) need_push_or_pull() !bool {
|
||||
last_local_commit := repo.get_last_local_commit() or {
|
||||
return error('Failed to get last local commit: ${err}')
|
||||
}
|
||||
println('commit status: ${repo.name} ${last_local_commit} ${last_remote_commit}')
|
||||
//println('commit status: ${repo.name} ${last_local_commit} ${last_remote_commit}')
|
||||
return last_local_commit != last_remote_commit
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ pub fn (repo GitRepo) patho() !pathlib.Path {
|
||||
// gets the path of a given url within a repo
|
||||
// ex: 'https://git.ourworld.tf/ourworld_holding/info_ourworld/src/branch/main/books/cocreation/SUMMARY.md'
|
||||
// returns <repo_path>/books/cocreation/SUMMARY.md
|
||||
fn (mut repo GitRepo) get_path_of_url(url string) !string {
|
||||
pub fn (mut repo GitRepo) get_path_of_url(url string) !string {
|
||||
// Split the URL into components
|
||||
url_parts := url.split('/')
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ pub fn load(url string) !LuaDNS {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
repo_path := repo.get_path()!
|
||||
repo_path := repo.path()
|
||||
|
||||
return LuaDNS{
|
||||
url: url
|
||||
|
||||
@@ -7,7 +7,7 @@ import freeflowuniverse.herolib.develop.gittools
|
||||
pub fn (dns LuaDNS) directory() !pathlib.Path {
|
||||
mut gs := gittools.new()!
|
||||
mut repo := gs.get_repo(url: dns.url, pull: true)!
|
||||
repo_path := repo.get_path()!
|
||||
repo_path := repo.path()
|
||||
return pathlib.get_dir(path: repo_path)!
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ fn play_book_publish(p Params) ! {
|
||||
|
||||
fn get_summary_path(summary_url string) !string {
|
||||
mut gs := gittools.get()!
|
||||
repo := gs.get_repo(url: summary_url, reset: false, pull: false)!
|
||||
mut repo := gs.get_repo(url: summary_url, reset: false, pull: false)!
|
||||
|
||||
// get the path corresponding to the summary_url dir/file
|
||||
summary_path := repo.get_path_of_url(summary_url)!
|
||||
|
||||
@@ -16,7 +16,7 @@ pub fn build_() ! {
|
||||
reset: false
|
||||
pull: true
|
||||
)!
|
||||
path := repo.get_path()!
|
||||
path := repo.path()
|
||||
cmd := '
|
||||
set -ex
|
||||
cd ${path}
|
||||
|
||||
@@ -15,7 +15,7 @@ pub fn install_() ! {
|
||||
|
||||
mut gs := gittools.new()!
|
||||
mut repo := gs.get_repo(url: 'https://github.com/threefoldtech/rfs', reset: true)!
|
||||
path := repo.get_path()!
|
||||
path := repo.path()
|
||||
cmd := '
|
||||
cd ${path}
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn configure(args_ InstallArgs) ! {
|
||||
mut repo := gs.get_repo(
|
||||
url: args.config_url
|
||||
)!
|
||||
repo_path = repo.get_path()!
|
||||
repo_path = repo.path()
|
||||
|
||||
args.config_path = repo_path
|
||||
}
|
||||
@@ -26,7 +26,7 @@ pub fn configure(args_ InstallArgs) ! {
|
||||
mut repo := gs.get_repo(
|
||||
url: args.dnszones_url
|
||||
)!
|
||||
repo_path = repo.get_path()!
|
||||
repo_path = repo.path()
|
||||
args.dnszones_path = repo_path
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ fn build() ! {
|
||||
reset: true
|
||||
pull: true
|
||||
)!
|
||||
gitpath := repo.get_path()!
|
||||
gitpath := repo.path()
|
||||
|
||||
// source ${osal.profile_path()}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ pub fn install(args InstallArgs) ! {
|
||||
vlang.v_analyzer_install(reset: args.reset)!
|
||||
|
||||
mut gs := gittools.get()!
|
||||
gs.config.light = true // means we clone depth 1
|
||||
gs.config()!.light = true // means we clone depth 1
|
||||
|
||||
mut repo := gs.get_repo(
|
||||
pull: args.git_pull
|
||||
@@ -44,7 +44,7 @@ pub fn install(args InstallArgs) ! {
|
||||
// url: 'https://github.com/freeflowuniverse/webcomponents/tree/main/webcomponents'
|
||||
// )!
|
||||
|
||||
mut path1 := repo.get_path()!
|
||||
mut path1 := repo.path()
|
||||
// mut path2 := repo2.get_path()!
|
||||
|
||||
mut path1p := pathlib.get_dir(path: path1, create: false)!
|
||||
|
||||
@@ -45,7 +45,7 @@ pub fn install(args_ InstallArgs) ! {
|
||||
url: 'https://github.com/vlang/v/tree/master'
|
||||
)!
|
||||
|
||||
mut path1 := repo.get_path()!
|
||||
mut path1 := repo.path()
|
||||
|
||||
mut extra := ''
|
||||
if core.is_linux()! {
|
||||
|
||||
@@ -47,7 +47,7 @@ Peers:
|
||||
reset: false
|
||||
)!
|
||||
|
||||
mut path := repo.get_path()!
|
||||
mut path := repo.path()
|
||||
|
||||
osal.exec(cmd: 'cd ${path} && PATH=\$PATH:/usr/local/go/bin ./build')!
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn build_(args BuildArgs) ! {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut gitpath := repo.get_path()!
|
||||
mut gitpath := repo.path()
|
||||
|
||||
cmd := '
|
||||
source ~/.cargo/env
|
||||
|
||||
@@ -32,7 +32,7 @@ pub fn build_(args BuildArgs) ! {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut path := repo.get_path()!
|
||||
mut path := repo.path()
|
||||
|
||||
cmd := '
|
||||
set -ex
|
||||
|
||||
@@ -68,7 +68,7 @@ fn build_() ! {
|
||||
reset: true
|
||||
pull: true
|
||||
)!
|
||||
gitpath := repo.get_path()!
|
||||
gitpath := repo.path()
|
||||
|
||||
// source ${osal.profile_path()!}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ fn build_() ! {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut path := repo.get_path()!
|
||||
mut path := repo.path()
|
||||
path = '${path}/griddriver'
|
||||
|
||||
cmd := '/bin/bash -c "cd ${path} && . ${path}/build.sh"'
|
||||
|
||||
@@ -55,7 +55,7 @@ pub fn build_() ! {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut path := repo.get_path()!
|
||||
mut path := repo.path()
|
||||
|
||||
cmd := '
|
||||
cd ${path}
|
||||
|
||||
@@ -50,7 +50,7 @@ fn build_() ! {
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut gitpath := repo.get_path()!
|
||||
mut gitpath := repo.path()
|
||||
|
||||
cmd := '
|
||||
cd ${gitpath}
|
||||
|
||||
@@ -54,7 +54,7 @@ pub fn new(args_ SimulatorArgs) !Simulator {
|
||||
reload: false
|
||||
)!
|
||||
|
||||
args.path = repo.get_path()!
|
||||
args.path = repo.path()
|
||||
}
|
||||
|
||||
if args.path.len > 0 {
|
||||
|
||||
@@ -59,7 +59,7 @@ pub fn new(args_ SimulatorArgs) !Simulator {
|
||||
reload: false
|
||||
)!
|
||||
|
||||
args.path = repo.get_path()!
|
||||
args.path = repo.path()
|
||||
}
|
||||
|
||||
simulator_set(sim)
|
||||
|
||||
Reference in New Issue
Block a user