summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Roemer2024-03-27 10:56:06 +0100
committerJP Roemer2024-03-27 10:56:06 +0100
commite53fecf3c3baf3beca29cbbfbca970a0501ce738 (patch)
treecea04915a1d5e732c85ddd5e33201a2381d5ff7a
parent9cf711bd2b5d86a811c50dcecf27482a6beb9f58 (diff)
downloadaur-aws-iam-authenticator.tar.gz
Bump version to v0.6.14
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD39
-rwxr-xr-xbumpversion.sh5
3 files changed, 35 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb4ab7a0f0d4..2ea8214eeee3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = aws-iam-authenticator
pkgdesc = A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster
- pkgver = 0.6.9
+ pkgver = 0.6.14
pkgrel = 1
url = https://github.com/kubernetes-sigs/aws-iam-authenticator
arch = x86_64
arch = aarch64
- license = Apache
+ license = Apache-2.0
makedepends = go
+ provides = aws-iam-authenticator
conflicts = aws-iam-authenticator-bin
conflicts = aws-iam-authenticator-git
- source = aws-iam-authenticator-0.6.9.tar.gz::https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/v0.6.9.tar.gz
- sha512sums = 8fb7b4803f20f1311b19c88cef1497017ff05ac5009309acc307c8befd219fc80815d281c2e3d139d0fe507e4ac4ed966be607347bd0298e6826b9be76b73873
+ source = aws-iam-authenticator_0.6.14.tar.gz::https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/v0.6.14.tar.gz
+ sha512sums = 26a6b394fbe767910f605a356032338a4ec254b81cd470796e3137e3595fef338bd213dee8d956c8d23e16f5508741e78664cd0f8b1acd97321d2fb5b7b723af
pkgname = aws-iam-authenticator
-
diff --git a/PKGBUILD b/PKGBUILD
index ea7e0042a542..9e672370aef7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,40 @@
-# Maintainer: Mike Hicklen <mike@xfs.repair>
+# Maintainer: JP Roemer <jp+aur@roemer.im>
+# Contributor: Mike Hicklen <mike@xfs.repair>
+# Contributor: David Birks <david@birks.dev>
pkgname=aws-iam-authenticator
-pkgver=0.6.9
+pkgver=0.6.14
pkgrel=1
pkgdesc='A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster'
arch=('x86_64' 'aarch64')
url='https://github.com/kubernetes-sigs/aws-iam-authenticator'
-license=('Apache')
+license=('Apache-2.0')
makedepends=('go')
-conflicts=('aws-iam-authenticator-bin' 'aws-iam-authenticator-git')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/v$pkgver.tar.gz")
-sha512sums=('8fb7b4803f20f1311b19c88cef1497017ff05ac5009309acc307c8befd219fc80815d281c2e3d139d0fe507e4ac4ed966be607347bd0298e6826b9be76b73873')
+provides=("${pkgname}")
+conflicts=("${pkgname}-bin" "${pkgname}-git")
+source=("${pkgname}_${pkgver}.tar.gz::https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/v$pkgver.tar.gz")
+sha512sums=('26a6b394fbe767910f605a356032338a4ec254b81cd470796e3137e3595fef338bd213dee8d956c8d23e16f5508741e78664cd0f8b1acd97321d2fb5b7b723af')
+
+export GGO_ENABLED="0"
+export CGO_CPPFLAGS="${CPPFLAGS}"
+export CGO_CFLAGS="${CFLAGS}"
+export CGO_CXXFLAGS="${CXXFLAGS}"
+export CGO_LDFLAGS="${LDFLAGS}"
+export GOFLAGS="-trimpath -mod=readonly -modcacherw"
build() {
- cd $pkgname-$pkgver
- go build \
- --trimpath \
- --ldflags "-X main.version=$pkgver" \
- ./cmd/aws-iam-authenticator
+ local _commit _flags
+ _commit=$(bsdcat "${pkgname}_${pkgver}.tar.gz" | git get-tar-commit-id)
+ _flags=(
+ -X=sigs.k8s.io/aws-iam-authenticator/pkg.Version="v${pkgver}"
+ -X=sigs.k8s.io/aws-iam-authenticator/pkg.CommitID="${_commit}"
+ -X=sigs.k8s.io/aws-iam-authenticator/pkg.BuildDate="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
+ )
+ cd "${pkgname}-${pkgver}"
+ go build -o "${pkgname}" -ldflags="-s -w ${_flags[*]}" "./cmd/${pkgname}"
}
package() {
- install -Dm 755 "$srcdir/$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
+ cd "${pkgname}-${pkgver}"
+ install -Dm 755 "${pkgname}" -t "${pkgdir}/usr/bin"
}
diff --git a/bumpversion.sh b/bumpversion.sh
index aac5fa2231d2..716aced70c61 100755
--- a/bumpversion.sh
+++ b/bumpversion.sh
@@ -1,11 +1,12 @@
+#!/usr/bin/env bash
echo "Scraping latest aws-iam-authenticator version from https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases"
-latestversion=$(curl -sq https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases | grep tag_name | sort | tail -1 | awk -F '"' '{print $4}')
+latestversion=$(curl -sq https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | jq -r '.tag_name')
echo "Latest aws-iam-authenticator version: ${latestversion}"
srcurl="https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/${latestversion}.tar.gz"
echo "Determining sha512sum for ${srcurl}"
-sha512sum=$(curl -sqLo - ${srcurl} | sha512sum | awk '{print $1}')
+sha512sum=$(curl -sqLo - "${srcurl}" | sha512sum | awk '{print $1}')
echo "aws-iam-authenticator sha512sum: ${sha512sum}"
echo "Updating PKGBUILD and .SRCINFO with new version and sha512sum"