2 Star 3 Fork 10

王布衣 / 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
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
master

搜索帮助