Skip to content

Commit 02ed9f4

Browse files
committed
cd: fix completion scripts corruption
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.
1 parent 4ba0521 commit 02ed9f4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.goreleaser.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
before:
22
hooks:
33
- go mod download
4+
- mage genCompletion # generate completion scripts. In global hook to avoid parallel writing.
45

56
env:
67
- GO111MODULE=on
@@ -25,10 +26,6 @@ builds:
2526
goarch:
2627
- amd64
2728

28-
hooks:
29-
pre:
30-
- mage genCompletion # generate completion scripts
31-
3229
archives:
3330
-
3431
id: "cartridge"

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Completion scripts corruption during package release.
13+
814
## [2.12.11] - 2024-04-02
915

1016
### Changed
1117

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

1521
## [2.12.10] - 2023-12-14

0 commit comments

Comments
 (0)