diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-19 18:42:54 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-19 18:42:54 +0900 |
| commit | 6e8bfa6c4c963ff6c7d417a1cc703e4504e1fb9d (patch) | |
| tree | ab6fbdeddaff07226edf4c5e3e81b3aa0fbff41e /internal/rosa/state.go | |
| parent | a770d62b9be4306846b7e1d8c0c94968be175f58 (diff) | |
internal/rosa/package: migrate cmake
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state.go')
| -rw-r--r-- | internal/rosa/state.go | 31 |
1 files changed, 26 insertions, 5 deletions
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( |
