forked from metaverse/truss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wininstall.bat
38 lines (29 loc) · 1.23 KB
/
wininstall.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@ECHO OFF
SET SHA_CMD="git rev-parse --short=10 HEAD"
FOR /F "tokens=* USEBACKQ" %%F IN (`%SHA_CMD%`) DO (
SET SHA=%%F
)
SET HEAD_CMD="git rev-parse HEAD"
FOR /F "tokens=* USEBACKQ" %%F IN (`%HEAD_CMD%`) DO (
SET HEAD_COMMIT=%%F
)
SET HEAD_DATE_CMD="git show -s --format=%%ct %HEAD_COMMIT%"
FOR /F "tokens=* USEBACKQ" %%F IN (`%HEAD_DATE_CMD%`) DO (
SET GIT_COMMIT_EPOC=%%F
)
SET DATE_FMT_CMD="go-datefmt -ts %GIT_COMMIT_EPOC% -fmt UnixDate -utc"
FOR /F "tokens=* USEBACKQ" %%F IN (`%DATE_FMT_CMD%`) DO (
SET HEAD_DATE=%%F
)
@ECHO ON
go get github.com/pauln/go-datefmt
:: go get github.com/gogo/protobuf/protoc-gen-gogo
go get -u github.com/gogo/protobuf/protoc-gen-gogo@21df5aa0e680850681b8643f0024f92d3b09930c
go get -u github.com/gogo/protobuf/protoc-gen-gogofaster@21df5aa0e680850681b8643f0024f92d3b09930c
:: go get github.com/gogo/protobuf/proto
go get -u github.com/gogo/protobuf/proto@21df5aa0e680850681b8643f0024f92d3b09930c
:: go get github.com/jteeuwen/go-bindata/...
go get -u github.com/kevinburke/go-bindata/go-bindata
go generate github.com/metaverse/truss/gengokit/template
go install -ldflags "-X 'main.version=%SHA%' -X 'main.date=%HEAD_DATE%'" github.com/metaverse/truss/cmd/truss
@ECHO OFF