internal/rosa: evaluate packages from fs
All checks were successful
Test / Create distribution (push) Successful in 1m6s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m31s
Test / Flake checks (push) Successful in 1m22s
All checks were successful
Test / Create distribution (push) Successful in 1m6s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m31s
Test / Flake checks (push) Successful in 1m22s
This migrates GNU sed to azalea, and resulting IR matches. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path"
|
||||
"slices"
|
||||
"strconv"
|
||||
@@ -608,3 +611,20 @@ var native S
|
||||
|
||||
// Native returns the global [S].
|
||||
func Native() *S { return &native }
|
||||
|
||||
// nativeB is the backing directory of built-in azalea-based [Artifact]
|
||||
// implementations.
|
||||
//
|
||||
//go:embed package
|
||||
var nativeB embed.FS
|
||||
|
||||
func init() {
|
||||
sub, err := fs.Sub(nativeB, "package")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err = native.EvaluateFS(sub); err != nil {
|
||||
println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user