refactor(cmd): use std runtime
package to get go version info (#7964)
* refactor(cmd): use std `runtime` package to get go version info - Remove the `GoVersion` variable. - Remove overriding `GoVersion` by ldflags in `build.sh`. - Get go version, OS and arch from the constants in the std `runtime` package instead of compile time. * chore(ci): remove `GoVersion` flag from workflows Remove GoVersion flag from beta_release.yml and build.yml workflows. > Reduce compile-time dependencies.
This commit is contained in:
1
.github/workflows/beta_release.yml
vendored
1
.github/workflows/beta_release.yml
vendored
@ -94,7 +94,6 @@ jobs:
|
||||
out-dir: build
|
||||
x-flags: |
|
||||
github.com/alist-org/alist/v3/internal/conf.BuiltAt=$built_at
|
||||
github.com/alist-org/alist/v3/internal/conf.GoVersion=$go_version
|
||||
github.com/alist-org/alist/v3/internal/conf.GitAuthor=Xhofe
|
||||
github.com/alist-org/alist/v3/internal/conf.GitCommit=$git_commit
|
||||
github.com/alist-org/alist/v3/internal/conf.Version=$tag
|
||||
|
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -49,7 +49,6 @@ jobs:
|
||||
out-dir: build
|
||||
x-flags: |
|
||||
github.com/alist-org/alist/v3/internal/conf.BuiltAt=$built_at
|
||||
github.com/alist-org/alist/v3/internal/conf.GoVersion=$go_version
|
||||
github.com/alist-org/alist/v3/internal/conf.GitAuthor=Xhofe
|
||||
github.com/alist-org/alist/v3/internal/conf.GitCommit=$git_commit
|
||||
github.com/alist-org/alist/v3/internal/conf.Version=$tag
|
||||
|
Reference in New Issue
Block a user