...
This commit is contained in:
@@ -20,7 +20,7 @@ pub mut:
|
||||
reset bool
|
||||
}
|
||||
|
||||
pub fn play(args PlayArgs) ! {
|
||||
pub fn play(args PlayArgs) ! PlayBook {
|
||||
mut plbook := args.plbook or {
|
||||
playbook.new(text: args.heroscript, path: args.heroscript_path)!
|
||||
}
|
||||
@@ -36,9 +36,11 @@ pub fn play(args PlayArgs) ! {
|
||||
mut model := getset(biz)!
|
||||
model.play(mut plbook)!
|
||||
}
|
||||
|
||||
return plbook
|
||||
}
|
||||
|
||||
pub fn (mut m BizModel) play(mut plbook PlayBook) ! {
|
||||
pub fn (mut m BizModel) play(mut plbook PlayBook) !PlayBook {
|
||||
mut actions := plbook.actions_find(actor: 'bizmodel')!
|
||||
|
||||
for action in actions.filter(it.name in action_priorities[0]) {
|
||||
@@ -65,4 +67,6 @@ pub fn (mut m BizModel) play(mut plbook PlayBook) ! {
|
||||
for action in actions.filter(it.name in action_priorities[3]) {
|
||||
m.act(*action)!
|
||||
}
|
||||
|
||||
return plbook
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
module playcmds
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
// import freeflowuniverse.herolib.virt.hetzner
|
||||
// import freeflowuniverse.herolib.clients.b2
|
||||
import freeflowuniverse.herolib.data.doctree
|
||||
import freeflowuniverse.herolib.biz.bizmodel
|
||||
// import freeflowuniverse.herolib.hero.publishing
|
||||
import freeflowuniverse.herolib.threefold.grid4.gridsimulator
|
||||
// import freeflowuniverse.herolib.threefold.grid4.gridsimulator
|
||||
// import freeflowuniverse.herolib.installers.sysadmintools.daguserver
|
||||
import freeflowuniverse.herolib.threefold.grid4.farmingsimulator
|
||||
// import freeflowuniverse.herolib.threefold.grid4.farmingsimulator
|
||||
// import freeflowuniverse.herolib.web.components.slides
|
||||
// import freeflowuniverse.herolib.installers.base as base_install
|
||||
// import freeflowuniverse.herolib.installers.infra.coredns
|
||||
import freeflowuniverse.herolib.data.doctree
|
||||
// import freeflowuniverse.herolib.virt.hetzner
|
||||
// import freeflowuniverse.herolib.clients.b2
|
||||
|
||||
|
||||
pub fn run(args_ PlayArgs) !PlayBook {
|
||||
|
||||
@@ -21,15 +22,10 @@ pub fn run(args_ PlayArgs) !PlayBook {
|
||||
mut plbook := args.plbook or {
|
||||
playbook.new(text: args.heroscript, path: args.heroscript_path)!
|
||||
}
|
||||
plbook = play_core(plbook:plbook)!
|
||||
plbook = play_git.play(mut plbook)!
|
||||
|
||||
// if dagu {
|
||||
// hscript := plbook.str()
|
||||
// scheduler(hscript)!
|
||||
// }
|
||||
|
||||
plbook = play_core(mut plbook)!
|
||||
plbook = play_ssh(mut plbook)!
|
||||
// play_git.play(mut plbook)! // Changed to play_git.play
|
||||
// plbook = play_ssh(mut plbook)!
|
||||
// play_publisher(mut plbook)!
|
||||
// play_zola(mut plbook)!
|
||||
// play_caddy(mut plbook)!
|
||||
@@ -38,10 +34,10 @@ pub fn run(args_ PlayArgs) !PlayBook {
|
||||
// hetzner.heroplay(mut plbook)!
|
||||
// b2.heroplay(mut plbook)!
|
||||
|
||||
plbook = farmingsimulator.play(mut plbook)!
|
||||
plbook = gridsimulator.play(mut plbook)!
|
||||
plbook = bizmodel.play(plbook:*plbook)!
|
||||
plbook = doctree.play(plbook:*plbook)!
|
||||
// plbook = farmingsimulator.play(mut plbook)!
|
||||
// plbook = gridsimulator.play(mut plbook)!
|
||||
plbook = bizmodel.play(plbook:plbook)!
|
||||
plbook = doctree.play(plbook:plbook)!
|
||||
|
||||
// slides.play(mut plbook)!
|
||||
// base_install(play(mut plbook)!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module doctree
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
|
||||
@[params]
|
||||
pub struct PlayArgs {
|
||||
@@ -12,7 +12,7 @@ pub mut:
|
||||
reset bool
|
||||
}
|
||||
|
||||
pub fn play(args_ PlayArgs) ! {
|
||||
pub fn play(args_ PlayArgs) !PlayBook {
|
||||
mut args := args_
|
||||
mut plbook := args.plbook or {
|
||||
playbook.new(text: args.heroscript, path: args.heroscript_path)!
|
||||
@@ -68,4 +68,6 @@ pub fn play(args_ PlayArgs) ! {
|
||||
// println(tree_list())
|
||||
// println(tree_get("main")!)
|
||||
// panic("sd")
|
||||
|
||||
return plbook
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user