1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00
goreleaser/scripts/fury-upload.sh
Carlos A Becker c456654778
fix: ignore 409 when pushing to fury.io
closes #2560

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-06 01:16:05 -03:00

13 lines
334 B
Bash
Executable File

#!/bin/bash
set -e
if [ "${1: -4}" == ".deb" ] || [ "${1: -4}" == ".rpm" ]; then
cd dist
echo "uploading $1"
status="$(curl -s -q -o /dev/null -w "%{http_code}" -F package="@$1" "https://$FURY_TOKEN@push.fury.io/goreleaser/")"
echo "got: $status"
if [ "$status" == "200" ] || [ "$status" == "409" ]; then
exit 0
fi
exit 1
fi