diff options
| author | Julian Hurst <ark@mansus.space> | 2024-11-01 17:59:32 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2024-11-01 17:59:32 +0100 |
| commit | 87254486a840b4d557f3fb6673c3f8c3073f8521 (patch) | |
| tree | e4e08cae391f9a3df6e0093caa0d293fb7b88f78 /distamp.ha | |
| parent | 1076c9b34af5b185d35ca33a14dbf0fd718ed988 (diff) | |
| download | distamp-87254486a840b4d557f3fb6673c3f8c3073f8521.tar.gz | |
Dev mode version string
Diffstat (limited to 'distamp.ha')
| -rw-r--r-- | distamp.ha | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -12,6 +12,8 @@ type parseerror = !strconv::error; def MAJOR = 2; def MINOR = 0; def PATCH = 0; +// hare build -RD DEV=false for release version +def DEV = true; export fn main() void = { const cmd = getopt::parse(os::args, @@ -63,7 +65,12 @@ export fn main() void = { fmt::fatal(strerror(e)); }; case 'v' => - fmt::printfln("{}.{}.{}-{}_{}", MAJOR, MINOR, PATCH, os::sysname(), os::arch_name(os::architecture()))!; + const dev = if (DEV) { + yield "_dev"; + } else { + yield ""; + }; + fmt::printfln("{}.{}.{}{}-{}_{}", MAJOR, MINOR, PATCH, dev, os::sysname(), os::arch_name(os::architecture()))!; return; case => abort(); }; |
