mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-06 18:36:50 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user