fix(ci): rename .archlinux files to .pkg.tar.zst for repo-add

repo-add validates file extensions and rejects .archlinux files.
Rename them to .pkg.tar.zst when symlinking into the repo directory.
This commit is contained in:
kolaente 2026-04-12 18:32:26 +02:00
parent e1fed9e252
commit 20deac2ce1
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 2 deletions

View File

@ -1457,7 +1457,9 @@ func (Release) RepoPacman(ctx context.Context) error {
}
for _, pkg := range pkgs {
abs, _ := filepath.Abs(pkg)
dst := filepath.Join(repoDir, filepath.Base(pkg))
// repo-add requires .pkg.tar.zst extension, nfpm archlinux files are .archlinux
base := strings.TrimSuffix(filepath.Base(pkg), ".archlinux") + ".pkg.tar.zst"
dst := filepath.Join(repoDir, base)
os.Remove(dst)
if err := os.Symlink(abs, dst); err != nil {
return err
@ -1466,7 +1468,7 @@ func (Release) RepoPacman(ctx context.Context) error {
// repo-add creates vikunja.db.tar.gz and vikunja.files.tar.gz
dbPath := filepath.Join(repoDir, "vikunja.db.tar.gz")
repoPkgs, _ := filepath.Glob(filepath.Join(repoDir, "*.archlinux"))
repoPkgs, _ := filepath.Glob(filepath.Join(repoDir, "*.pkg.tar.zst"))
repoAddArgs := append([]string{dbPath}, repoPkgs...)
if err := runAndStreamOutput(ctx, "repo-add", repoAddArgs...); err != nil {
return fmt.Errorf("repo-add for %s: %w", repoArch, err)