summaryrefslogtreecommitdiff
path: root/indexing/zhmakeindex/install.cmd
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /indexing/zhmakeindex/install.cmd
Initial commit
Diffstat (limited to 'indexing/zhmakeindex/install.cmd')
-rw-r--r--indexing/zhmakeindex/install.cmd16
1 files changed, 16 insertions, 0 deletions
diff --git a/indexing/zhmakeindex/install.cmd b/indexing/zhmakeindex/install.cmd
new file mode 100644
index 0000000000..820556dad8
--- /dev/null
+++ b/indexing/zhmakeindex/install.cmd
@@ -0,0 +1,16 @@
+setlocal
+%~d0
+cd %~p0
+
+if exist VERSION (
+ for /f "delims=" %%i in (VERSION) do set zhmVersion=%%i
+) else (
+ set zhmVersion=devel
+)
+for /f "delims=" %%i in ('git log -1 --pretty^=format:"%%h(%%ai"') do set zhmRevision=%%i
+set zhmRevision=%zhmRevision:~0,18%)
+set FLAGS=-ldflags "-X main.Version=%zhmVersion% -X main.Revision=%zhmRevision%"
+
+go install %FLAGS%
+
+endlocal