From 6bcc64eb61772b2c957a65f9d577c59fcd1d9158 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Sat, 21 May 2016 10:53:05 -0700 Subject: [PATCH] Wren 0.1.0! There's nothing new in this "release", but now is as good a time as any to start versioning. Going forward, I plan to do periodic releases and update the changelog so users can see what's going on. --- CHANGELOG.md | 3 +++ src/cli/vm.c | 2 +- src/include/wren.h | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..00d5119f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +First declared version. Everything is new! diff --git a/src/cli/vm.c b/src/cli/vm.c index e258091a..2754b617 100644 --- a/src/cli/vm.c +++ b/src/cli/vm.c @@ -257,7 +257,7 @@ int runRepl() initVM(); printf("\\\\/\"-\n"); - printf(" \\_/ wren v0.0.0\n"); + printf(" \\_/ wren v%s\n", WREN_VERSION_STRING); char line[MAX_LINE_LENGTH]; diff --git a/src/include/wren.h b/src/include/wren.h index 4c9e1de7..afe801dd 100644 --- a/src/include/wren.h +++ b/src/include/wren.h @@ -5,6 +5,20 @@ #include #include +// The Wren semantic version number components. +#define WREN_VERSION_MAJOR 0 +#define WREN_VERSION_MINOR 1 +#define WREN_VERSION_PATCH 0 + +// A human-friendly string representation of the version. +#define WREN_VERSION_STRING "0.1.0" + +// A monotonically increasing numeric representation of the version number. Use +// this if you want to do range checks over versions. +#define WREN_VERSION_NUMBER (WREN_VERSION_MAJOR * 1000000 + \ + WREN_VERSION_MINOR * 1000 + \ + WREN_VERSION_PATCH) + // A single virtual machine for executing Wren code. // // Wren has no global state, so all state stored by a running interpreter lives