{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- | Neuron git repo version
--
-- This module is loaded in ghcid and cabal new-repl. However, nix-build will
-- have it overwritten by the then `git describe` (see default.nix).
module Neuron.Version.RepoVersion
  ( version,
  )
where

import Development.GitRev (gitDescribe, gitDirty)
import Relude

version :: Text
version :: Text
version = [Char] -> Text
forall a. ToText a => a -> Text
toText ([Char] -> Text) -> [Char] -> Text
forall a b. (a -> b) -> a -> b
$ $(gitDescribe) [Char] -> [Char] -> [Char]
forall a. Semigroup a => a -> a -> a
<> [Char] -> [Char] -> Bool -> [Char]
forall a. a -> a -> Bool -> a
bool "" "-dirty" $(Bool
gitDirty)