internal/rosa/git: determine reporting name from url
All checks were successful
Test / Create distribution (push) Successful in 1m17s
Test / Sandbox (push) Successful in 3m16s
Test / Hakurei (push) Successful in 4m17s
Test / ShareFS (push) Successful in 4m25s
Test / Sandbox (race detector) (push) Successful in 5m47s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Create distribution (push) Successful in 1m17s
Test / Sandbox (push) Successful in 3m16s
Test / Hakurei (push) Successful in 4m17s
Test / ShareFS (push) Successful in 4m25s
Test / Sandbox (race detector) (push) Successful in 5m47s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Flake checks (push) Successful in 1m26s
This is generally correct, and is a lot cleaner to call. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -2,6 +2,7 @@ package rosa
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"hakurei.app/internal/pkg"
|
"hakurei.app/internal/pkg"
|
||||||
)
|
)
|
||||||
@@ -91,10 +92,13 @@ func init() {
|
|||||||
|
|
||||||
// NewViaGit returns a [pkg.Artifact] for cloning a git repository.
|
// NewViaGit returns a [pkg.Artifact] for cloning a git repository.
|
||||||
func (t Toolchain) NewViaGit(
|
func (t Toolchain) NewViaGit(
|
||||||
name, url, rev string,
|
url, rev string,
|
||||||
checksum pkg.Checksum,
|
checksum pkg.Checksum,
|
||||||
) pkg.Artifact {
|
) pkg.Artifact {
|
||||||
return t.New(name+"-"+path.Base(rev), 0, t.AppendPresets(nil,
|
return t.New(strings.TrimSuffix(
|
||||||
|
path.Base(url),
|
||||||
|
".git",
|
||||||
|
)+"-src-"+path.Base(rev), 0, t.AppendPresets(nil,
|
||||||
NSSCACert,
|
NSSCACert,
|
||||||
Git,
|
Git,
|
||||||
), &checksum, nil, `
|
), &checksum, nil, `
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ func (t Toolchain) newP11Kit() (pkg.Artifact, string) {
|
|||||||
checksum = "3ei-6DUVtYzrRVe-SubtNgRlweXd6H2qHmUu-_5qVyIn6gSTvZbGS2u79Y8IFb2N"
|
checksum = "3ei-6DUVtYzrRVe-SubtNgRlweXd6H2qHmUu-_5qVyIn6gSTvZbGS2u79Y8IFb2N"
|
||||||
)
|
)
|
||||||
return t.NewPackage("p11-kit", version, t.NewViaGit(
|
return t.NewPackage("p11-kit", version, t.NewViaGit(
|
||||||
"p11-kit-src", "https://github.com/p11-glue/p11-kit.git",
|
"https://github.com/p11-glue/p11-kit.git",
|
||||||
"refs/tags/"+version, mustDecode(checksum),
|
"refs/tags/"+version, mustDecode(checksum),
|
||||||
), nil, &MesonHelper{
|
), nil, &MesonHelper{
|
||||||
Setup: []KV{
|
Setup: []KV{
|
||||||
|
|||||||
Reference in New Issue
Block a user