mirror of
https://github.com/gomods/athens
synced 2026-02-03 13:20:30 +00:00
* add index translation of install section * add translation of build-from-source * add chinese translation of install-on-aci.md * add chinese translation of intall-on-kubernetes * add zh translation of managing-private-repos * fix some typos
976 B
Executable File
976 B
Executable File
title, description, weight
| title | description | weight |
|---|---|---|
| 从源代码构建版本化的Athens二进制文件 | 从源代码构建版本化的Athens二进制文件 | 1 |
您只需执行以下几个命令即可轻松实现构建Athens二进制文件:
Bash
git clone https://github.com/gomods/athens
cd athens
make build-ver VERSION="0.2.0"
PowerShell
git clone https://github.com/gomods/athens
cd athens
$env:GO111MODULE="on"
$env:GOPROXY="https://proxy.golang.org"
$version = "0.2.0"
$date = (Get-Date).ToUniversalTime()
go build -ldflags "-X github.com/gomods/athens/pkg/build.version=$version -X github.com/gomods/athens/pkg/build.buildDate=$date" -o athens ./cmd/proxy
这将生成一个名为athens的二进制文件. 你可以通过下列命令打印版本以及构建时间:
./athens -version
which should return something like:
Build Details:
Version: 0.2.0
Date: 2018-12-13-20:51:06-UTC