feat: add .git asset for source-only GitHub releases

Source-only releases (no uploaded assets) now also emit a .git
asset with the GitHub clone URL, matching how gittag-sourced
packages like vim-commentary and vim-zig work. This allows
install via git clone --branch <tag> as an alternative to
downloading the tarball.
This commit is contained in:
AJ ONeal
2026-03-10 17:18:21 -06:00
parent d56f43e3b4
commit 2bd1537e9c

View File

@@ -620,6 +620,16 @@ func classifyGitHub(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]st
Date: date,
})
}
// Git clone asset — same as gittag source.
gitURL := fmt.Sprintf("https://github.com/%s/%s.git", owner, repo)
assets = append(assets, storage.Asset{
Filename: tag,
Version: version,
Channel: channel,
Format: ".git",
Download: gitURL,
Date: date,
})
}
}
return assets, nil