BUILDER
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
api="https://api.github.com/repos/acmagn/ratune/releases/latest"
|
||||
json="$(curl --fail --silent --show-error --retry 3 "$api")"
|
||||
tag="$(jq -er '.tag_name | select(test("^v[0-9]+\\.[0-9]+\\.[0-9]+"))' <<<"$json")"
|
||||
version="${tag#v}"
|
||||
current="$(tr -d '[:space:]' < .current-version 2>/dev/null || true)"
|
||||
|
||||
echo "Latest Ratune release: $tag"
|
||||
echo "Previously published: ${current:-none}"
|
||||
|
||||
if [[ "$tag" == "$current" ]]; then
|
||||
echo "Release already published; skipping."
|
||||
{
|
||||
echo "tag=$tag"
|
||||
echo "version=$version"
|
||||
echo "skip=true"
|
||||
} >> "${GITHUB_OUTPUT:-/dev/null}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
{
|
||||
echo "tag=$tag"
|
||||
echo "version=$version"
|
||||
echo "skip=false"
|
||||
} >> "${GITHUB_OUTPUT:-/dev/null}"
|
||||
Reference in New Issue
Block a user