aboutsummaryrefslogtreecommitdiff
path: root/distamp.ha
diff options
context:
space:
mode:
Diffstat (limited to 'distamp.ha')
-rw-r--r--distamp.ha9
1 files changed, 8 insertions, 1 deletions
diff --git a/distamp.ha b/distamp.ha
index 19c3226..acb673f 100644
--- a/distamp.ha
+++ b/distamp.ha
@@ -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();
};