Skip to content

Commit

Permalink
regal: add ldflags to show version
Browse files Browse the repository at this point in the history
this is used by `version` subcommand

Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
rinx committed Sep 28, 2024
1 parent e911628 commit bf911d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/by-name/re/regal/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ buildGoModule rec {

vendorHash = "sha256-Yl8ZFEiAJRAetc3e2ZdrbTdYhx/Ek9nr3mMQ0H7+aGM=";

ldflags = [
"-s" "-w"
"-X github.com/styrainc/regal/pkg/version.Version=${version}"
"-X github.com/styrainc/regal/pkg/version.Commit=${version}"
];

meta = with lib; {
description = "Linter and language server for Rego";
mainProgram = "regal";
Expand Down

0 comments on commit bf911d2

Please sign in to comment.