1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-09-16 09:26:52 +02:00

fix: docs script

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker
2021-02-10 16:03:30 -03:00
parent 69826bd442
commit 35c71b6522

View File

@@ -1,13 +1,13 @@
#!/bin/bash
set -xeuo pipefail
set -euo pipefail
url="https://api.github.com/repos/goreleaser/goreleaser/releases"
get_last_page() {
curl -sSf -I -H "Authorization: Bearer $GITHUB_TOKEN" \
"$url" |
grep -E '^Link: ' |
sed -e 's/^Link:.*page=//g' -e 's/>.*$//g'
grep -E '^link: ' |
sed -e 's/^link:.*page=//g' -e 's/>.*$//g'
}
last_page="$(get_last_page)"