aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-19 19:28:18 +0900
committerOphestra <cat@gensokyo.uk>2026-05-19 19:28:18 +0900
commit548c96c7ec4a8c7c5abb4df1dac3d4a8671e2171 (patch)
treea6f586def327ab9c434bd6ef3a083d3cc1605b88 /internal/rosa/state.go
parent6e8bfa6c4c963ff6c7d417a1cc703e4504e1fb9d (diff)
internal/rosa/package: migrate make
This also introduces the generic helper for unusual build scripts. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state.go')
-rw-r--r--internal/rosa/state.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index 87e27456..78da6817 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -624,6 +624,23 @@ func (s *S) getFrame() azalea.Frame {
// high-level helpers
+ k("generic"): {F: func(
+ args azalea.FArgs,
+ ) (v any, set bool, err error) {
+ var attr GenericHelper
+ if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
+ k("mktemp"): &attr.EnterTemp,
+ k("build"): &attr.Build,
+ k("check"): &attr.Check,
+ k("install"): &attr.Install,
+ }); err != nil {
+ return
+ }
+ v = &attr
+ set = true
+ return
+ }},
+
k("make"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {