Merge pull request #559 from fluxcd/prevent-aur-publish-parallel-run

Prevent AUR package publishing parallel execution
pull/561/head
Hidde Beydals 4 years ago committed by GitHub
commit 25e782177b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,11 @@ WD=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
PKGNAME=$(basename $WD) PKGNAME=$(basename $WD)
ROOT=${WD%/.github/aur/$PKGNAME} 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 export VERSION=$1
echo "Publishing to AUR as version ${VERSION}" echo "Publishing to AUR as version ${VERSION}"

@ -6,6 +6,11 @@ WD=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
PKGNAME=$(basename $WD) PKGNAME=$(basename $WD)
ROOT=${WD%/.github/aur/$PKGNAME} 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 export VERSION=$1
echo "Publishing to AUR as version ${VERSION}" echo "Publishing to AUR as version ${VERSION}"

@ -6,6 +6,11 @@ WD=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
PKGNAME=$(basename $WD) PKGNAME=$(basename $WD)
ROOT=${WD%/.github/aur/$PKGNAME} 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 export VERSION=$1
echo "Publishing to AUR as version ${VERSION}" echo "Publishing to AUR as version ${VERSION}"

@ -23,15 +23,6 @@ builds:
id: windows id: windows
goos: goos:
- windows - windows
- id: aurmock
binary: aurmock
main: ./cmd/flux
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
archives: archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
id: nix id: nix
@ -45,9 +36,6 @@ archives:
format: zip format: zip
files: files:
- none* - none*
- name_template: "aur_{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
id: aur
builds: [aurmock]
brews: brews:
- name: flux - name: flux
tap: tap:
@ -64,30 +52,21 @@ brews:
system "#{bin}/flux --version" system "#{bin}/flux --version"
publishers: publishers:
- name: aur-pkg-bin - name: aur-pkg-bin
ids:
- aur
env: env:
- AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }} - AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }}
cmd: | cmd: |
.github/aur/flux-bin/publish.sh {{ .Version }} .github/aur/flux-bin/publish.sh {{ .Version }}
- name: aur-pkg-scm - name: aur-pkg-scm
ids:
- aur
env: env:
- AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }} - AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }}
cmd: | cmd: |
.github/aur/flux-scm/publish.sh {{ .Version }} .github/aur/flux-scm/publish.sh {{ .Version }}
- name: aur-pkg-go - name: aur-pkg-go
ids:
- aur
env: env:
- AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }} - AUR_BOT_SSH_PRIVATE_KEY={{ .Env.AUR_BOT_SSH_PRIVATE_KEY }}
cmd: | cmd: |
.github/aur/flux-go/publish.sh {{ .Version }} .github/aur/flux-go/publish.sh {{ .Version }}
release: release:
ids:
- nix
- windows
extra_files: extra_files:
- glob: ./output/manifests.tar.gz - glob: ./output/manifests.tar.gz
- glob: ./output/install.yaml - glob: ./output/install.yaml

Loading…
Cancel
Save