Merge pull request #232530 from otavio/mods-improve

mods: add updateScript and tests.version
This commit is contained in:
figsoda
2023-05-17 22:10:41 -04:00
committed by GitHub
+14
View File
@@ -1,6 +1,9 @@
{ lib
, buildGoModule
, fetchFromGitHub
, gitUpdater
, testers
, mods
}:
buildGoModule rec {
@@ -18,6 +21,17 @@ buildGoModule rec {
ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
passthru = {
updateScript = gitUpdater {
rev-prefix = "v";
ignoredVersions = ".(rc|beta).*";
};
tests.version = testers.testVersion {
package = mods;
};
};
meta = with lib; {
description = "AI on the command line";
homepage = "https://github.com/charmbracelet/mods";