Resolve ARM variant in the value of the environment variable
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
da7830d0e3
commit
24c807a941
8
build.go
8
build.go
|
@ -462,6 +462,12 @@ func buildPackage(ctx context.Context, script string, mgr manager.Manager) ([]st
|
||||||
|
|
||||||
func genBuildEnv(info *distro.OSRelease) []string {
|
func genBuildEnv(info *distro.OSRelease) []string {
|
||||||
env := os.Environ()
|
env := os.Environ()
|
||||||
|
|
||||||
|
arch := runtime.GOARCH
|
||||||
|
if arch == "arm" {
|
||||||
|
arch = cpu.ARMVariant()
|
||||||
|
}
|
||||||
|
|
||||||
env = append(
|
env = append(
|
||||||
env,
|
env,
|
||||||
"DISTRO_NAME="+info.Name,
|
"DISTRO_NAME="+info.Name,
|
||||||
|
@ -469,7 +475,7 @@ func genBuildEnv(info *distro.OSRelease) []string {
|
||||||
"DISTRO_ID="+info.ID,
|
"DISTRO_ID="+info.ID,
|
||||||
"DISTRO_VERSION_ID="+info.VersionID,
|
"DISTRO_VERSION_ID="+info.VersionID,
|
||||||
|
|
||||||
"ARCH="+runtime.GOARCH,
|
"ARCH="+arch,
|
||||||
"NCPU="+strconv.Itoa(runtime.NumCPU()),
|
"NCPU="+strconv.Itoa(runtime.NumCPU()),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue