Merge pull request #234530 from figsoda/go-task

go-task: fix version
This commit is contained in:
Nick Cao 2023-05-27 23:29:55 -06:00 committed by GitHub
commit f02e22b36e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,10 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, go-task
}:
buildGoModule rec {
pname = "go-task";
@ -20,7 +26,9 @@ buildGoModule rec {
subPackages = [ "cmd/task" ];
ldflags = [
"-s" "-w" "-X main.version=${version}"
"-s"
"-w"
"-X=github.com/go-task/task/v3/internal/version.version=${version}"
];
postInstall = ''
@ -29,6 +37,12 @@ buildGoModule rec {
installShellCompletion completion/{bash,fish,zsh}/*
'';
passthru.tests = {
version = testers.testVersion {
package = go-task;
};
};
meta = with lib; {
homepage = "https://taskfile.dev/";
description = "A task runner / simpler Make alternative written in Go";