aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_version_info.cmd
diff options
context:
space:
mode:
authorPjotr Prins2018-06-29 12:51:41 +0000
committerPjotr Prins2018-06-29 12:51:41 +0000
commit9f9887eb5befe025e85641f1930e46e5e6a25e56 (patch)
treeaf87047d49fb39b7a7a5c7c1d5dc2b98400c5595 /scripts/gen_version_info.cmd
parent7f61ca0761e93918f64119c50b32e2812eba8291 (diff)
parent159f95233afd36c98335059e35cd6c51e4760d24 (diff)
downloadpangemma-9f9887eb5befe025e85641f1930e46e5e6a25e56.tar.gz
Merge branch 'master' of github.com:genetics-statistics/GEMMA
Diffstat (limited to 'scripts/gen_version_info.cmd')
-rw-r--r--scripts/gen_version_info.cmd16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/gen_version_info.cmd b/scripts/gen_version_info.cmd
new file mode 100644
index 0000000..d824687
--- /dev/null
+++ b/scripts/gen_version_info.cmd
@@ -0,0 +1,16 @@
+@echo off
+rem https://stackoverflow.com/questions/3472631/how-do-i-get-the-day-month-and-year-from-a-windows-cmd-exe-script
+FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
+ if "%%B" NEQ "" (
+ SET /A FDATE=%%F*10000+%%D*100+%%A
+ )
+)
+set year=%FDATE:~0,4%
+set /p version=<VERSION
+
+echo // version.h generated by GEMMA
+rem https://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
+echo|set /p="#define GEMMA_VERSION ""
+echo %version%"
+echo #define GEMMA_DATE "%FDATE:~0,8%"
+echo #define GEMMA_YEAR "%year%"