2020-02-20 06:25:28 +07:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
GITTAG=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')
|
|
|
|
|
|
|
|
echo "--- :linux: Deploy AUR package: ${PACKAGE}"
|
|
|
|
git clone ssh://aur@aur.archlinux.org/"${PACKAGE}".git
|
|
|
|
cd "${PACKAGE}" || exit
|
|
|
|
|
|
|
|
if [[ $PACKAGE != "authelia-git" ]]; then
|
|
|
|
sed -i "/pkgver=/c\pkgver=${BUILDKITE_TAG//v/}" PKGBUILD && \
|
2020-04-28 21:07:20 +07:00
|
|
|
sed -i "/pkgrel=/c\pkgrel=1" PKGBUILD && \
|
2020-02-20 06:25:28 +07:00
|
|
|
docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && updpkgsums"
|
|
|
|
else
|
2020-04-28 21:07:20 +07:00
|
|
|
sed -i "/pkgver=/c\pkgver=${GITTAG}" PKGBUILD && \
|
|
|
|
sed -i "/pkgrel=/c\pkgrel=1" PKGBUILD
|
2020-02-20 06:25:28 +07:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && makepkg --printsrcinfo >| .SRCINFO" && \
|
|
|
|
git add . && \
|
|
|
|
if [[ $PACKAGE != "authelia-git" ]]; then
|
|
|
|
git commit -m "Update to ${BUILDKITE_TAG}"
|
|
|
|
else
|
|
|
|
git commit -m "Update to GIT version: ${GITTAG}"
|
|
|
|
fi
|
|
|
|
git push
|