From 4ed29f2257600172b6f767a2fa45a77f6215fb2b Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 17 Jan 2025 16:52:54 +0100 Subject: [PATCH 1/2] fix(chain): fix issue in release ci and command --- changelog.md | 1 + ignite/pkg/archive/tar_gz.go | 13 +++++++++++++ ignite/services/chain/build.go | 2 +- .../app/files/.github/workflows/release.yml | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index a6295f1b42..54c66f83b1 100644 --- a/changelog.md +++ b/changelog.md @@ -53,6 +53,7 @@ - [#4091](/~https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic - [#4128](/~https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config - [#4402](/~https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package +- []() Fix issue in `build --release` command ## [`v28.7.0`](/~https://github.com/ignite/cli/releases/tag/v28.7.0) diff --git a/ignite/pkg/archive/tar_gz.go b/ignite/pkg/archive/tar_gz.go index c4500d86f5..6ac2248ae2 100644 --- a/ignite/pkg/archive/tar_gz.go +++ b/ignite/pkg/archive/tar_gz.go @@ -41,6 +41,19 @@ func addToArchive(tw *tar.Writer, filename string) error { } // Create a tar Header from the FileInfo data + if info.IsDir() { + hdr, err := tar.FileInfoHeader(info, info.Name()) + if err != nil { + return err + } + hdr.Name = filename + if err := tw.WriteHeader(hdr); err != nil { + return err + } + + return nil + } + header, err := tar.FileInfoHeader(info, info.Name()) if err != nil { return err diff --git a/ignite/services/chain/build.go b/ignite/services/chain/build.go index 3cc286e69d..99a28be190 100644 --- a/ignite/services/chain/build.go +++ b/ignite/services/chain/build.go @@ -189,7 +189,7 @@ func (c *Chain) BuildRelease( defer tarf.Close() if err := archive.CreateArchive(out, tarf); err != nil { - return "", err + return "", errors.Errorf("error creating release archive: %w", err) } } diff --git a/ignite/templates/app/files/.github/workflows/release.yml b/ignite/templates/app/files/.github/workflows/release.yml index 2ceabd4d34..6ef7a51642 100644 --- a/ignite/templates/app/files/.github/workflows/release.yml +++ b/ignite/templates/app/files/.github/workflows/release.yml @@ -34,6 +34,7 @@ jobs: args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 -t darwin:arm64 -y env: DO_NOT_TRACK: 1 + GOFLAGS: "-buildvcs=false" - name: Delete the "latest" Release uses: dev-drprasad/delete-tag-and-release@v0.2.1 From e8a3591c1ef87656114d47049dd5e788ad6dfc78 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 17 Jan 2025 17:00:07 +0100 Subject: [PATCH 2/2] updates --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 54c66f83b1..e51c988a7e 100644 --- a/changelog.md +++ b/changelog.md @@ -53,7 +53,7 @@ - [#4091](/~https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic - [#4128](/~https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config - [#4402](/~https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package -- []() Fix issue in `build --release` command +- [#4474](/~https://github.com/ignite/cli/pull/4474) Fix issue in `build --release` command ## [`v28.7.0`](/~https://github.com/ignite/cli/releases/tag/v28.7.0)