Prevent AUR package publishing parallel execution
Using a lock to prevent parallel executions in GoReleaser's custom publishers. The custom publisher logic executes the tasks in parallel for each available artifact. https://goreleaser.com/customization/publishers/#how-it-works Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
This commit is contained in:
5
.github/aur/flux-scm/publish.sh
vendored
5
.github/aur/flux-scm/publish.sh
vendored
@@ -6,6 +6,11 @@ WD=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
|
||||
PKGNAME=$(basename $WD)
|
||||
ROOT=${WD%/.github/aur/$PKGNAME}
|
||||
|
||||
LOCKFILE=/tmp/aur-$PKGNAME.lock
|
||||
exec 100>$LOCKFILE || exit 0
|
||||
flock -n 100 || exit 0
|
||||
trap "rm -f $LOCKFILE" EXIT
|
||||
|
||||
export VERSION=$1
|
||||
echo "Publishing to AUR as version ${VERSION}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user