diff options
author | Amir Zarrinkafsh | 2021-08-11 13:39:50 +1000 |
---|---|---|
committer | Amir Zarrinkafsh | 2021-08-11 13:39:50 +1000 |
commit | 3bc50ad4b66f0f31c2a16f883cc6a70f278a44c5 (patch) | |
tree | fc014165ea0adc9cd551077676d7125fd1310f30 | |
parent | a8d786107d3104bcc8acbd6a464263e02f40c42b (diff) | |
download | aur-3bc50ad4b66f0f31c2a16f883cc6a70f278a44c5.tar.gz |
Fix XOPTIONS and web build locations
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 20 |
2 files changed, 13 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = authelia pkgdesc = The Cloud ready multi-factor authentication portal for your Apps. pkgver = 4.30.4 - pkgrel = 1 + pkgrel = 2 url = https://github.com/authelia/authelia arch = x86_64 arch = aarch64 @@ -1,15 +1,16 @@ # Maintainer: Amir Zarrinkafsh <nightah at me dot com> pkgname=authelia pkgver=4.30.4 -pkgrel=1 +pkgrel=2 pkgdesc="The Cloud ready multi-factor authentication portal for your Apps." arch=('x86_64' 'aarch64' 'armv7h') url="https://github.com/authelia/authelia" license=('Apache-2.0') makedepends=( + 'curl' 'gcc' - 'git' 'go' + 'jq' 'nodejs' 'yarn' ) @@ -24,17 +25,20 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/a sha256sums=('0be88888ae1fc1a488417cbda09c0e01adee98002b13249992c828a5e4612dd1') build() { - export GOPATH="$srcdir/gopath" PATH="$PATH:$srcdir/gopath/bin" + export GOPATH="$srcdir/gopath" PATH="$PATH:$srcdir/gopath/bin" _pkgver="v${pkgver}" cd "$srcdir/$pkgname-$pkgver/web" + + COMMIT=$(curl -s https://api.github.com/repos/authelia/authelia/tags | jq -r '.[] | select(.name==env._pkgver) | .commit.sha') + TAG=v${pkgver} + STATE="tagged clean" + DATE=$(date +"%a, %d %b %Y %R:%S %z") + XOPTIONS="-X 'github.com/authelia/authelia/v4/internal/utils.BuildBranch=v${pkgver}' -X 'github.com/authelia/authelia/v4/internal/utils.BuildTag=${TAG}' -X 'github.com/authelia/authelia/v4/internal/utils.BuildCommit=${COMMIT}' -X 'github.com/authelia/authelia/v4/internal/utils.BuildDate=${DATE}' -X 'github.com/authelia/authelia/v4/internal/utils.BuildState=${STATE}' -X 'github.com/authelia/authelia/v4/internal/utils.BuildNumber=AUR'" + yarn install --frozen-lockfile INLINE_RUNTIME_CHUNK=false yarn build - rm -rf ../internal/server/public_html - mv build ../internal/server/public_html cd .. cp -R api internal/server/public_html/ - sed -i "s/__BUILD_TAG__/v${pkgver}/" cmd/authelia/constants.go - sed -i "s/__BUILD_COMMIT__/$(git rev-parse --verify v${pkgver})/" cmd/authelia/constants.go - go build -ldflags '-w' -trimpath -o authelia cmd/authelia/*.go + go build -ldflags "-w ${XOPTIONS}" -trimpath -o authelia cmd/authelia/*.go } package() { |