We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xray version
build
Custom
稍微进行了一下考古:在古老的 v2ray 里,有一个 release 脚本负责把 core.go 中的 build 变量改成当前日期,进而在 version 命令中显示,而 Custom 只是一个占位用的默认值。自 v2ray 被社区接管以来,那个 release 脚本被废弃,build 就被固定为了 Custom。后来的 GitHub CI 是从 Azure Pipelines 迁移过来的,没有对这个 build 做处理。
core.go
而 Xray 这里有些费解,release.yml 中只在常规运行 CI 时将 build 替换为 commit ID,在发布 release 时不做处理,导致使用 release 版本时,xray version 中显示的 build 始终为 Custom。
release.yml
建议把这里的 Custom 改成某种有意义的东西,不管是最初设计中的当前日期,还是 commit ID,或是什么别的东西。这样如果有自己编译的版本也容易区分。另外这里应该通过 env 传入一个值比较好,原来的方法算是个历史遗留。
The text was updated successfully, but these errors were encountered:
等个大佬pr,发现了(遇到)自己编译时始终为 Custom
Sorry, something went wrong.
目前由于 golang/go#50603 还未被解决,可用的方法是在编译时手动增加一个标志:-ldflags "-X github.com/xtls/xray-core/core.build=${sha/tag}"。
-ldflags "-X github.com/xtls/xray-core/core.build=${sha/tag}"
Makefile
感谢提issue fixed in 187
No branches or pull requests
稍微进行了一下考古:在古老的 v2ray 里,有一个 release 脚本负责把
core.go
中的build
变量改成当前日期,进而在 version 命令中显示,而Custom
只是一个占位用的默认值。自 v2ray 被社区接管以来,那个 release 脚本被废弃,build
就被固定为了Custom
。后来的 GitHub CI 是从 Azure Pipelines 迁移过来的,没有对这个build
做处理。而 Xray 这里有些费解,
release.yml
中只在常规运行 CI 时将build
替换为 commit ID,在发布 release 时不做处理,导致使用 release 版本时,xray version
中显示的build
始终为Custom
。建议把这里的
Custom
改成某种有意义的东西,不管是最初设计中的当前日期,还是 commit ID,或是什么别的东西。这样如果有自己编译的版本也容易区分。另外这里应该通过 env 传入一个值比较好,原来的方法算是个历史遗留。The text was updated successfully, but these errors were encountered: