Own ARM-compatible recipes and sync upstream directly
This commit is contained in:
21 files changed
+204
-43
No files matched your search
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"source": "aur",
|
||||
"release_ring": "fast",
|
||||
"upstream_commit": "fc4db00ecaf6c2669422b32c023a16bf6eb4e6c7"
|
||||
"source": "local",
|
||||
"release_ring": "fast"
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# GitHub Copilot CLI is published to npm. Track npm's stable `latest` tag,
|
||||
# then hash both inputs the PKGBUILD downloads. AUR is deliberately not part
|
||||
# of this update path: Omarchy owns the multi-architecture recipe.
|
||||
set -euo pipefail
|
||||
|
||||
REGISTRY_URL="https://registry.npmjs.org/@github%2Fcopilot"
|
||||
CHANGELOG_BASE="https://raw.githubusercontent.com/github/copilot-cli"
|
||||
|
||||
metadata=$(curl -fsSL "$REGISTRY_URL")
|
||||
version=$(jq -r '."dist-tags".latest // ""' <<<"$metadata")
|
||||
tarball=$(jq -r --arg version "$version" '.versions[$version].dist.tarball // ""' <<<"$metadata")
|
||||
|
||||
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ || ! $tarball =~ ^https://registry\.npmjs\.org/ ]]; then
|
||||
echo "npm returned an unusable Copilot release: version='$version' tarball='$tarball'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
|
||||
if [[ $(vercmp "$version" "$current") -le 0 ]]; then
|
||||
echo '{}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
curl -fsSL -o "$work/copilot.tgz" "$tarball"
|
||||
curl -fsSL -o "$work/changelog.md" "$CHANGELOG_BASE/v${version}/changelog.md"
|
||||
|
||||
jq -n \
|
||||
--arg pkgver "$version" \
|
||||
--arg package_sum "$(sha256sum "$work/copilot.tgz" | cut -d' ' -f1)" \
|
||||
--arg changelog_sum "$(sha256sum "$work/changelog.md" | cut -d' ' -f1)" \
|
||||
'{pkgver: $pkgver, sha256sums: {any: [$package_sum, $changelog_sum]}}'
|
||||
Reference in new issue
Block a user