internal/rosa/git: determine reporting name from url
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:
cat
2026-04-02 22:42:16 +09:00
parent b948525c07
commit 15bff9e1a6
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -2,6 +2,7 @@ package rosa
import (
"path"
"strings"
"hakurei.app/internal/pkg"
)
@@ -91,10 +92,13 @@ func init() {
// NewViaGit returns a [pkg.Artifact] for cloning a git repository.
func (t Toolchain) NewViaGit(
name, url, rev string,
url, rev string,
checksum pkg.Checksum,
) 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,
Git,
), &checksum, nil, `