mods: add updateScript and tests.version

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
Otavio Salvador 2023-05-17 21:34:05 -03:00
parent 7c6ca2791b
commit 72590183f0

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";