mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-20 21:30:50 +08:00
- Introduced `Version` variable, set during build via `-ldflags`, to embed application version. - Updated Dockerfile to accept `APP_VERSION` argument for version injection during build. - Modified `.goreleaser.yml` to pass GitHub release tag as version via `ldflags`. - Added version logging in the application startup.
24 lines
458 B
YAML
24 lines
458 B
YAML
builds:
|
|
- id: "cli-proxy-api"
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./cmd/server/
|
|
binary: cli-proxy-api
|
|
ldflags:
|
|
- -X 'main.Version={{.Env.GORELEASER_CURRENT_TAG}}'
|
|
archives:
|
|
- id: "cli-proxy-api"
|
|
format: tar.gz
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
files:
|
|
- LICENSE
|
|
- README.md
|
|
- README_CN.md
|
|
- config.example.yaml |