diff options
-rw-r--r-- | nix/package.nix | 6 | ||||
-rw-r--r-- | searchix.go | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nix/package.nix b/nix/package.nix index d311505..99f47c3 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -17,14 +17,10 @@ let inherit (builtins) concatStringsSep match; - version = "0-unstable-" + concatStringsSep "-" (match - "([[:digit:]]{4})([[:digit:]]{2})([[:digit:]]{2}).*" - self.lastModifiedDate - ); in buildGoApplication { pname = "searchix"; - inherit version; + version = "0.1.0"; src = with pkgs.lib.fileset; toSource { root = ../.; fileset = difference diff --git a/searchix.go b/searchix.go index 6a984ee..ba33e3f 100644 --- a/searchix.go +++ b/searchix.go @@ -52,7 +52,11 @@ func nextOccurrenceOfLocalTime(t toml.LocalTime) time.Time { func main() { flag.Parse() if *version { - fmt.Fprintln(os.Stderr, "searchix", buildVersion, config.CommitSHA) + fmt.Fprintf(os.Stderr, "searchix %s", buildVersion) + if buildVersion != config.CommitSHA && buildVersion != config.ShortSHA { + fmt.Fprintf(os.Stderr, " %s", config.CommitSHA) + } + fmt.Fprint(os.Stderr, "\n") os.Exit(0) } |