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
commit 53c7e1590b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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