2021-06-26 01:45:21 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-02-19 23:25:28 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-06-26 01:45:21 +00:00
|
|
|
if [[ "${PACKAGE}" != "authelia-git" ]]; then
|
2021-11-18 00:57:11 +00:00
|
|
|
sed -i -e "/^pkgver=/c pkgver=${BUILDKITE_TAG//v/}" \
|
|
|
|
-e '/^pkgrel=/c pkgrel=1' PKGBUILD && \
|
2020-02-19 23:25:28 +00:00
|
|
|
docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && updpkgsums"
|
|
|
|
else
|
2021-11-18 00:57:11 +00:00
|
|
|
sed -i -e "/^pkgver=/c pkgver=${GITTAG}" \
|
|
|
|
-e '/^pkgrel=/c pkgrel=1' PKGBUILD
|
2020-02-19 23:25:28 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && makepkg --printsrcinfo >| .SRCINFO" && \
|
|
|
|
git add . && \
|
2021-06-26 01:45:21 +00:00
|
|
|
if [[ "${PACKAGE}" != "authelia-git" ]]; then
|
2020-02-19 23:25:28 +00:00
|
|
|
git commit -m "Update to ${BUILDKITE_TAG}"
|
|
|
|
else
|
|
|
|
git commit -m "Update to GIT version: ${GITTAG}"
|
|
|
|
fi
|
2021-06-26 01:45:21 +00:00
|
|
|
git push
|