From 16f87bf664135f704f41dfdf5dc0ad520901a49c Mon Sep 17 00:00:00 2001 From: psergee Date: Mon, 6 May 2024 19:17:30 +0300 Subject: [PATCH] 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. --- .goreleaser.yml | 5 +---- CHANGELOG.md | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 4dac6c85b..d6f61e8e0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,7 @@ before: hooks: - go mod download + - mage genCompletion # generate completion scripts. In global hook to avoid parallel writing. env: - GO111MODULE=on @@ -25,10 +26,6 @@ builds: goarch: - amd64 - hooks: - pre: - - mage genCompletion # generate completion scripts - archives: - id: "cartridge" diff --git a/CHANGELOG.md b/CHANGELOG.md index ce419ffc1..9dc93d8e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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