2 Star 7 Fork 11

王布衣/engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
publish-windows.ps1 894 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2024-01-22 18:43 . 新增windows下ps1编译脚本
# engine 编译脚本
# author: wangfeng
# since: 2023-09-12
$commit_id = (git rev-list --tags --max-count = 1) | Out-String
$command = "git describe --tags ${commit_id}"
$repo = (Invoke-Expression $command) | Out-String
$version = $repo.Substring(1).Trim()
Write-Output "quant version: ${version}"
$repo = (go list -m gitee.com/quant1x/gotdx) | Out-String
$gotdx_version = ($repo -split " ")[1]
$gotdx_version = $gotdx_version.Substring(1).Trim()
Write-Output "gotdx version: $gotdx_version"
$BIN = "./bin"
$APP = "stock"
$EXT = ".exe"
$repo = "gitee.com/quant1x/engine"
$GOOS = "windows"
$GOARCH = $env:PROCESSOR_ARCHITECTURE
$GOARCH = $GOARCH.Trim().ToLower()
$command = "go env -w GOOS=${GOOS} GOARCH=${GOARCH}; go build -ldflags `"-s -w -X 'main.MinVersion=$version' -X 'main.tdxVersion=$gotdx_version'`" -o ${BIN}/${APP}${EXT} ${repo}"
Write-Output $command
Invoke-Expression $command
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
master

搜索帮助