Skip to content

Commit

Permalink
Include Git hash in the release packages' name
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnovak committed Jul 7, 2024
1 parent 87c9846 commit 9e05f80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ const mingw32Dir = r"C:\dev\mingw32"

const rootDir = getCurrentDir()
const version = staticRead("CURRENT_VERSION").strip
const gitHash = strutils.strip(staticExec("git rev-parse --short=5 HEAD"))
const currYear = CompileDate[0..3]

const macPackageName = fmt"gridmonger-v{version}-macos.zip"
const macPackageName = fmt"gridmonger-v{version}-{gitHash}-macos.zip"

const dataDir = "Data"
const exampleMapsDir = "Example Maps"
Expand Down Expand Up @@ -71,10 +72,10 @@ type Arch = enum
let arch = if hostCPU == "i386": Arch32 else: Arch64

proc getWinInstallerPackageName(arch: Arch): string =
fmt"gridmonger-v{version}-win{arch}-setup.exe"
fmt"gridmonger-v{version}-{gitHash}-win{arch}-setup.exe"

proc getWinPortablePackageName(arch: Arch): string =
fmt"gridmonger-v{version}-win{arch}-portable.zip"
fmt"gridmonger-v{version}-{gitHash}-win{arch}-portable.zip"


# All tasks must be executed from the project root directory!
Expand Down

0 comments on commit 9e05f80

Please sign in to comment.