Skip to content

Commit

Permalink
cd: fix completion scripts corruption
Browse files Browse the repository at this point in the history
The goreleaser tool runs builds and build hooks in parallel,
which can sometimes cause multiple completion generation processes
to write to the same file at the same time. To fix this, move the
completion script generation outside of the "builds" section.
  • Loading branch information
psergee committed May 6, 2024
1 parent 4ba0521 commit 02ed9f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
before:
hooks:
- go mod download
- mage genCompletion # generate completion scripts. In global hook to avoid parallel writing.

env:
- GO111MODULE=on
Expand All @@ -25,10 +26,6 @@ builds:
goarch:
- amd64

hooks:
pre:
- mage genCompletion # generate completion scripts

archives:
-
id: "cartridge"
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Completion scripts corruption during package release.

## [2.12.11] - 2024-04-02

### Changed

- Updated the `go` and `docker` package versions used to build the binary,
- Updated the `go` and `docker` package versions used to build the binary,
that fixes known security issues.

## [2.12.10] - 2023-12-14
Expand Down

0 comments on commit 02ed9f4

Please sign in to comment.