2020-06-18 07:49:13 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-12-27 11:07:53 +00:00
|
|
|
set -eu
|
|
|
|
|
|
|
|
artifacts=()
|
|
|
|
|
2021-04-15 07:56:32 +00:00
|
|
|
for FILE in \
|
2020-01-19 23:53:55 +00:00
|
|
|
authelia-linux-amd64.tar.gz authelia-linux-amd64.tar.gz.sha256 \
|
2021-09-16 12:39:18 +00:00
|
|
|
authelia-linux-arm.tar.gz authelia-linux-arm.tar.gz.sha256 \
|
|
|
|
authelia-linux-arm64.tar.gz authelia-linux-arm64.tar.gz.sha256 \
|
2021-09-26 02:08:47 +00:00
|
|
|
authelia-linux-amd64-musl.tar.gz authelia-linux-amd64-musl.tar.gz.sha256 \
|
|
|
|
authelia-linux-arm-musl.tar.gz authelia-linux-arm-musl.tar.gz.sha256 \
|
|
|
|
authelia-linux-arm64-musl.tar.gz authelia-linux-arm64-musl.tar.gz.sha256 \
|
2021-09-16 12:39:18 +00:00
|
|
|
authelia-freebsd-amd64.tar.gz authelia-freebsd-amd64.tar.gz.sha256 \
|
2020-04-28 14:07:20 +00:00
|
|
|
authelia-public_html.tar.gz authelia-public_html.tar.gz.sha256;
|
2019-12-27 11:07:53 +00:00
|
|
|
do
|
2021-04-15 07:56:32 +00:00
|
|
|
# Add the version to the artifact name
|
2021-07-05 02:49:48 +00:00
|
|
|
mv ${FILE} ${FILE/authelia-/authelia-${BUILDKITE_TAG}-}
|
2021-04-15 07:56:32 +00:00
|
|
|
artifacts+=(-a "${FILE/authelia-/authelia-${BUILDKITE_TAG}-}")
|
2019-12-27 11:07:53 +00:00
|
|
|
done
|
|
|
|
|
2021-06-26 01:45:21 +00:00
|
|
|
for FILE in \
|
|
|
|
authelia_amd64.deb authelia_amd64.deb.sha256 \
|
|
|
|
authelia_arm64.deb authelia_arm64.deb.sha256 \
|
|
|
|
authelia_armhf.deb authelia_armhf.deb.sha256;
|
|
|
|
do
|
|
|
|
# Add the version to the artifact name
|
2021-07-05 02:49:48 +00:00
|
|
|
mv ${FILE} ${FILE/authelia_/authelia_${BUILDKITE_TAG}_}
|
2021-06-26 01:45:21 +00:00
|
|
|
artifacts+=(-a "${FILE/authelia_/authelia_${BUILDKITE_TAG}_}")
|
|
|
|
done
|
|
|
|
|
2020-01-19 23:53:55 +00:00
|
|
|
echo "--- :github: Deploy artifacts for release: ${BUILDKITE_TAG}"
|
2021-03-29 22:17:19 +00:00
|
|
|
hub release create "${BUILDKITE_TAG}" "${artifacts[@]}" -F <(echo -e "${BUILDKITE_TAG}\n$(conventional-changelog -p angular -o /dev/stdout -r 2 | sed -e '1,3d')\n\n### Docker Container\n* \`docker pull authelia/authelia:${BUILDKITE_TAG//v}\`\n* \`docker pull ghcr.io/authelia/authelia:${BUILDKITE_TAG//v}\`"); EXIT=$?
|
2020-03-01 04:56:04 +00:00
|
|
|
|
2021-06-26 01:45:21 +00:00
|
|
|
if [[ "${EXIT}" == 0 ]];
|
2020-03-01 04:56:04 +00:00
|
|
|
then
|
|
|
|
exit
|
|
|
|
else
|
|
|
|
hub release delete "${BUILDKITE_TAG}" && false
|
|
|
|
fi
|