forked from rosa/hakurei
internal/rosa/package: migrate cmake
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user