From 6e8bfa6c4c963ff6c7d417a1cc703e4504e1fb9d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 19 May 2026 18:42:54 +0900 Subject: internal/rosa/package: migrate cmake Signed-off-by: Ophestra --- internal/rosa/state.go | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'internal/rosa/state.go') diff --git a/internal/rosa/state.go b/internal/rosa/state.go index 90da8660..87e27456 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -423,6 +423,12 @@ func (s *S) getFrame() azalea.Frame { identArch = k(s.arch) ) + enumCompress := map[unique.Handle[azalea.Ident]]any{ + k("uncompressed"): uint32(pkg.TarUncompressed), + k("gzip"): uint32(pkg.TarGzip), + k("bzip2"): uint32(pkg.TarBzip2), + } + s.frame.Val = map[unique.Handle[azalea.Ident]]any{ k("linuxArch"): s.linuxArch(), @@ -492,11 +498,7 @@ func (s *S) getFrame() azalea.Frame { v = pkg.NewHTTPGetTar(nil, url, mustDecode(checksum), compress) set = true return - }, V: map[unique.Handle[azalea.Ident]]any{ - k("uncompressed"): uint32(pkg.TarUncompressed), - k("gzip"): uint32(pkg.TarGzip), - k("bzip2"): uint32(pkg.TarBzip2), - }}, + }, V: enumCompress}, k("remoteFile"): {F: func( args azalea.FArgs, @@ -601,6 +603,25 @@ func (s *S) getFrame() azalea.Frame { return }}, + k("remoteGitHubRelease"): {F: func( + args azalea.FArgs, + ) (v any, set bool, err error) { + var suffix, tag, name, checksum string + var compress uint32 + if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ + k("suffix"): &suffix, + k("tag"): &tag, + k("name"): &name, + k("checksum"): &checksum, + k("compress"): &compress, + }); err != nil { + return + } + v = newFromGitHubRelease(suffix, tag, name, checksum, compress) + set = true + return + }, V: enumCompress}, + // high-level helpers k("make"): {F: func( -- cgit v1.3.1