Skip to content

Commit 526aa60

Browse files
author
Karl 'NaN' Wikström
committed
Fix Pr comments
Add comment about PKGBUILD population Add link to AUR Go package guidelines Break long sed into smaller, more understandable parts
1 parent 63583ad commit 526aa60

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/publish-aur.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ jobs:
1717

1818
- name: Update PKGBUILD
1919
run: |
20-
sed -i "s/tag=/tag=${GITHUB_REF##*/}/g" build/PKGBUILD
21-
sed -i "s/sha256sums=/sha256sums=('$(sha256sum ${GITHUB_REF##*/}.tar.gz | awk '{print $1;}')')/g" build/PKGBUILD
20+
tag=${GITHUB_REF##*/}
21+
hash=$(sha256sum $tag.tar.gz | awk '{print $1;}')
22+
sed -i "s/tag=/tag=$tag/g" build/PKGBUILD
23+
sed -i "s/sha256sums=/sha256sums=('$hash')/g" build/PKGBUILD
2224
2325
- name: Publish AUR package
2426
uses: KSXGitHub/github-actions-deploy-aur@v2.2.0

build/PKGBUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#Maintainer: Karl Wikström <boogrocha@sidus.io>
22
#Maintainer: William Leven <boogrocha@sidus.io>
33

4+
# _tag and sha256 is populated by the pipeline
45
_tag=
56
pkgname=boogrocha
67
pkgver=$_tag
@@ -21,6 +22,7 @@ _src="BooGroCha-${pkgver:1}"
2122
build() {
2223
cd $_src
2324
# Build as per Go package guidelines
25+
# https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options
2426
go build \
2527
-trimpath \
2628
-buildmode=pie \

0 commit comments

Comments
 (0)