mirror of
https://github.com/aaif-goose/goose.git
synced 2026-06-02 06:14:27 +02:00
Update the repo script (#9158)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO="${GOOSE_GITHUB_REPO:-$(git remote get-url origin | sed 's|.*github.com[:/]||;s|\.git$||')}"
|
REPO="${GOOSE_GITHUB_REPO:-aaif-goose/goose}"
|
||||||
DEST="$HOME/Downloads"
|
DEST="$HOME/Downloads"
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
PLIST=$(mktemp /tmp/entitlements.XXXXXX)
|
PLIST=$(mktemp /tmp/entitlements.XXXXXX)
|
||||||
@@ -16,12 +16,13 @@ fi
|
|||||||
|
|
||||||
PR=$(gh pr list --repo "$REPO" --search "$SEARCH in:title" --state all --limit 1 --json number,title)
|
PR=$(gh pr list --repo "$REPO" --search "$SEARCH in:title" --state all --limit 1 --json number,title)
|
||||||
PR_NUMBER=$(echo "$PR" | jq -r '.[0].number // empty')
|
PR_NUMBER=$(echo "$PR" | jq -r '.[0].number // empty')
|
||||||
VERSION=$(echo "$PR" | jq -r '.[0].title // empty' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
|
||||||
|
|
||||||
if [[ -z "$PR_NUMBER" ]]; then
|
if [[ -z "$PR_NUMBER" ]]; then
|
||||||
echo "No matching release PR found."
|
echo "No matching release PR found in $REPO (search: \"$SEARCH\")."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
VERSION=$(echo "$PR" | jq -r '.[0].title // empty' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || true)
|
||||||
echo "Found PR #$PR_NUMBER - version $VERSION"
|
echo "Found PR #$PR_NUMBER - version $VERSION"
|
||||||
|
|
||||||
# Grab the last nightly.link download URL from PR comments
|
# Grab the last nightly.link download URL from PR comments
|
||||||
|
|||||||
Reference in New Issue
Block a user