加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wininstall.bat 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
@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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化