2024-01-17 10:12:05 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -n "${SEMAPHORE_GIT_TAG_NAME}" ]; then
|
|
|
|
echo "Releasing packages..."
|
|
|
|
else
|
|
|
|
echo "Skipping release"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf dist
|
|
|
|
|
|
|
|
for os in linux darwin windows freebsd openbsd; do
|
2024-01-24 17:54:05 +00:00
|
|
|
goreleaser release --skip=publish -p 2 --timeout="90m" --config "$(go run ./internal/release "$os")"
|
2024-01-17 10:12:05 +00:00
|
|
|
go clean -cache
|
|
|
|
done
|
|
|
|
|
2024-10-08 09:58:05 +00:00
|
|
|
cat dist/**/*_checksums.txt >> "dist/traefik_${VERSION}_checksums.txt"
|
2024-01-17 10:12:05 +00:00
|
|
|
rm dist/**/*_checksums.txt
|
2024-10-08 09:58:05 +00:00
|
|
|
tar cfz "dist/traefik-${VERSION}.src.tar.gz" \
|
2024-01-17 10:12:05 +00:00
|
|
|
--exclude-vcs \
|
|
|
|
--exclude .idea \
|
|
|
|
--exclude .travis \
|
|
|
|
--exclude .semaphoreci \
|
|
|
|
--exclude .github \
|
|
|
|
--exclude dist .
|
|
|
|
|
2024-10-08 09:58:05 +00:00
|
|
|
chown -R "$(id -u)":"$(id -g)" dist/
|