diff options
| author | Mikkel Hjortshoej <fyoucon@gmail.com> | 2020-08-23 15:25:19 +0200 |
|---|---|---|
| committer | Mikkel Hjortshoej <fyoucon@gmail.com> | 2020-08-23 15:25:19 +0200 |
| commit | ae2fc5830e18d536909fdb816c73b240867bff69 (patch) | |
| tree | 9fb66bd426f74319cb47e56f25a1d0cf6003d520 /src/main.cpp | |
| parent | 16b50a2f578a2038a747e7f42f330f845a92cd97 (diff) | |
Add git sha to `odin version` command
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9e7f7b612..13d9e53bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1684,7 +1684,17 @@ int main(int arg_count, char const **arg_ptr) { return 1; #endif } else if (command == "version") { - gb_printf("%.*s version %.*s\n", LIT(args[0]), LIT(ODIN_VERSION)); + gb_printf("%.*s version %.*s", LIT(args[0]), LIT(ODIN_VERSION)); + + #ifdef NIGHTLY + gb_printf("-nightly"); + #endif + + #ifdef GIT_SHA + gb_printf("-%s", GIT_SHA); + #endif + + gb_printf("\n"); return 0; } else { usage(args[0]); |