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 7, 2024
1 parent 4ba0521 commit 16f87bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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
Expand Down

0 comments on commit 16f87bf

Please sign in to comment.