Skip to content

Commit

Permalink
fix(chain): fix issue in release ci and command (backport #4474) (#4475)
Browse files Browse the repository at this point in the history
* fix(chain): fix issue in release ci and command (#4474)

* fix(chain): fix issue in release ci and command

* updates

(cherry picked from commit a0ac845)

# Conflicts:
#	ignite/pkg/archive/tar_gz.go
#	ignite/services/chain/build.go

* conflicts

---------

Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
mergify[bot] and julienrbrt authored Jan 17, 2025
1 parent c902195 commit 538870f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- [#4471](https://github.com/ignite/cli/pull/4471) Bump CometBFT to v0.38.15.
- [#4471](https://github.com/ignite/cli/pull/4471) Bump Ignite & chain minimum Go version to 1.23.

### Bug Fixes

- [#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)

### Features
Expand Down
13 changes: 13 additions & 0 deletions ignite/pkg/archive/tar_gz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/chain/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
1 change: 1 addition & 0 deletions ignite/templates/app/files/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down

0 comments on commit 538870f

Please sign in to comment.