From acda3a7f411704e417a670b9be97a5f0e2b30d98 Mon Sep 17 00:00:00 2001 From: Dzmitry Hil Date: Fri, 29 Nov 2024 20:18:37 +0300 Subject: [PATCH] Fix coreum update integration tests for darwin. --- build/coreum/images.go | 36 ++++++++++++++++++++---------------- build/go.mod | 2 +- build/go.sum | 4 ++-- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/build/coreum/images.go b/build/coreum/images.go index 047ca0d41..2866a7249 100644 --- a/build/coreum/images.go +++ b/build/coreum/images.go @@ -78,21 +78,25 @@ func buildCoredDockerImage(ctx context.Context, cfg imageConfig) error { // ensureReleasedBinaries ensures that all previous cored versions are installed. func ensureReleasedBinaries(ctx context.Context, deps types.DepsFunc) error { - for _, binaryTool := range []tools.Name{ - tools.CoredV303, - tools.CoredV401, - } { - if err := tools.Ensure(ctx, binaryTool, tools.TargetPlatformLinuxLocalArchInDocker); err != nil { - return err - } - if err := tools.CopyToolBinaries( - binaryTool, - tools.TargetPlatformLinuxLocalArchInDocker, - filepath.Join("bin", ".cache", binaryName, tools.TargetPlatformLinuxLocalArchInDocker.String()), - fmt.Sprintf("bin/%s", binaryTool)); err != nil { - return err - } + const binaryTool = tools.CoredV401 + if err := tools.Ensure(ctx, binaryTool, tools.TargetPlatformLinuxLocalArchInDocker); err != nil { + return err } - - return nil + if err := tools.CopyToolBinaries( + binaryTool, + tools.TargetPlatformLinuxLocalArchInDocker, + filepath.Join("bin", ".cache", binaryName, tools.TargetPlatformLinuxLocalArchInDocker.String()), + fmt.Sprintf("bin/%s", binaryTool)); err != nil { + return err + } + // copy the release binary for the local platform to use for the genesis generation + if err := tools.Ensure(ctx, binaryTool, tools.TargetPlatformLocal); err != nil { + return err + } + return tools.CopyToolBinaries( + binaryTool, + tools.TargetPlatformLocal, + filepath.Join("bin", ".cache", binaryName, tools.TargetPlatformLocal.String()), + fmt.Sprintf("bin/%s", binaryTool), + ) } diff --git a/build/go.mod b/build/go.mod index 029bac7c1..1623a173f 100644 --- a/build/go.mod +++ b/build/go.mod @@ -28,7 +28,7 @@ replace ( require ( github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68 github.com/CoreumFoundation/coreum/v5 v5.0.0-20241022051641-b49ec5faa621 - github.com/CoreumFoundation/crust v0.0.0-20241121173755-aee1cf8f8254 + github.com/CoreumFoundation/crust v0.0.0-20241129171414-cffd7df39db1 github.com/iancoleman/strcase v0.3.0 github.com/pkg/errors v0.9.1 github.com/samber/lo v1.39.0 diff --git a/build/go.sum b/build/go.sum index 390ab1486..790910f84 100644 --- a/build/go.sum +++ b/build/go.sum @@ -231,8 +231,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68 h1:Tb9avuSQW3smVGrUnDh/Y+ML4eK802UsvJNZHsBgOGg= github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68/go.mod h1:VD93vCHkxYaT/RhOesXTFgd/GQDW54tr0BqGi5JU1c0= -github.com/CoreumFoundation/crust v0.0.0-20241121173755-aee1cf8f8254 h1:W1gJa+DVmhz1qc3Am0NS326Z1lVaspN47Qrz0RiKDYM= -github.com/CoreumFoundation/crust v0.0.0-20241121173755-aee1cf8f8254/go.mod h1:DC2Jq9oOJgDccdSqwxggqoFJ+EMn1wl8hMXAnnK4DSs= +github.com/CoreumFoundation/crust v0.0.0-20241129171414-cffd7df39db1 h1:ylsvQQFejOwFEk7J+q2ZDy60dGjUbEqHxbCKxt2dJgU= +github.com/CoreumFoundation/crust v0.0.0-20241129171414-cffd7df39db1/go.mod h1:DC2Jq9oOJgDccdSqwxggqoFJ+EMn1wl8hMXAnnK4DSs= github.com/CosmWasm/wasmd v0.53.0 h1:kdaoAi20bIb4VCsxw9pRaT2g5PpIp82Wqrr9DRVN9ao= github.com/CosmWasm/wasmd v0.53.0/go.mod h1:FJl/aWjdpGof3usAMFQpDe07Rkx77PUzp0cygFMOvtw= github.com/CosmWasm/wasmvm/v2 v2.1.2 h1:GkJ5bAsRlLHfIQVg/FY1VHwLyBwlCjAhDea0B8L+e20=