cmd/mbf: custom azalea path
Test / Create distribution (push) Successful in 54s
Test / Sandbox (push) Successful in 2m53s
Test / Hakurei (push) Successful in 4m33s
Test / ShareFS (push) Successful in 4m38s
Test / Sandbox (race detector) (push) Successful in 6m14s
Test / Hakurei (race detector) (push) Successful in 7m38s
Test / Flake checks (push) Successful in 1m23s
Test / Create distribution (push) Successful in 54s
Test / Sandbox (push) Successful in 2m53s
Test / Hakurei (push) Successful in 4m33s
Test / ShareFS (push) Successful in 4m38s
Test / Sandbox (race detector) (push) Successful in 6m14s
Test / Hakurei (race detector) (push) Successful in 7m38s
Test / Flake checks (push) Successful in 1m23s
This enables out-of-tree packaging. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -101,6 +101,7 @@ func main() {
|
||||
flagLTO bool
|
||||
flagPT bool
|
||||
flagDry bool
|
||||
flagPath string
|
||||
|
||||
flagSourcePath string
|
||||
flagCrossOverride int
|
||||
@@ -122,6 +123,8 @@ func main() {
|
||||
if cm.base == "" {
|
||||
cm.base = "cache"
|
||||
}
|
||||
cm.mirror = os.ExpandEnv(cm.mirror)
|
||||
azaleaPath := os.ExpandEnv(flagPath)
|
||||
|
||||
addr.Net = "unix"
|
||||
addr.Name = os.ExpandEnv(addr.Name)
|
||||
@@ -159,6 +162,17 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
if azaleaPath != "" {
|
||||
var root *os.Root
|
||||
if a, err := check.NewAbs(azaleaPath); err != nil {
|
||||
return err
|
||||
} else if root, err = os.OpenRoot(a.String()); err != nil {
|
||||
return err
|
||||
} else if err = rosa.Native().RegisterFS(root.FS()); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}).Flag(
|
||||
&flagQuiet,
|
||||
@@ -231,6 +245,10 @@ func main() {
|
||||
&flagSourcePath,
|
||||
"source", command.StringFlag(""),
|
||||
"Override hakurei source tree",
|
||||
).Flag(
|
||||
&flagPath,
|
||||
"p", command.StringFlag("$AZALEA_PATH"),
|
||||
"Load additional azalea files",
|
||||
)
|
||||
|
||||
c.NewCommand(
|
||||
|
||||
Reference in New Issue
Block a user