Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ jobs:
# bundle; see the header of this script for what happens while core has
# not published it yet.
- name: Fetch package-ci harness
run: tools/fetch-package-ci.sh --out=package-ci --core-repo="${CORE_REPO}"
# The core version found above, not the release published last: a 7.0.x patch
# published after a 7.1 beta would otherwise bring the older builder.
# 0.0.0 means no core release was found; the newest bundle is then the best guess.
run: |
REF="${{ steps.core-version.outputs.version }}"
[ "$REF" = "0.0.0" ] && REF=""
tools/fetch-package-ci.sh --out=package-ci --core-repo="${CORE_REPO}" ${REF:+--ref="$REF"}

- name: Check whether build-catalog.php has shipped yet
id: builder
Expand Down
8 changes: 5 additions & 3 deletions tools/fetch-package-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
#
# --out=DIR where to assemble package-ci/ [default: package-ci]
# --core-repo=R the core repository [default: mindstellar/shopclass]
# --ref=REF pin the fallback clone to this tag/branch instead of
# auto-detecting the newest release tag
# --ref=REF take the bundle from this release, and pin the fallback
# clone to this tag/branch, instead of the newest release
#
# Exit codes: 0 = at least the required components (package-lint.php,
# Compatibility.php, deprecated-api.json) are present in package-ci/;
Expand Down Expand Up @@ -140,8 +140,10 @@ try_release_tarball() {
fi

local asset_url
asset_url="$(printf '%s' "$releases" | jq -r '
# With --ref the bundle comes from that release; without it, from the newest one.
asset_url="$(printf '%s' "$releases" | jq -r --arg ref "$REF" '
map(select(.draft == false))
| if $ref != "" then map(select(.tag_name == $ref)) else . end
| sort_by(.published_at)
| reverse
| map(.assets[]? | select(.name == "shopclass-package-ci.tar.gz") | {url: .browser_download_url, tag: .tag_name})
Expand Down
Loading