mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 21:23:02 +01:00
* ci: read release secrets from aws secrets manager * ci: read the linux signing key from hex/release/RELEASE_SIGNING_KEY * ci: hex's own aur and homebrew keys; the signing cert has no password * ci: the signing certificate has no password * ci: use the shared aur and homebrew keys * docs: the shared homebrew deploy key is anomaly-release * docs: the shared homebrew deploy key is anomaly-release * site: own /hex/files, drop the r2 write credential (#1611) * site: own /hex/files for installers, appcast, and dev notes The site build now copies install-linux.sh, install-windows.ps1, and packaging/macos/legacy-appcast.xml into its Worker assets, so the same Worker serves them at /hex/files with the Content-Type and Cache-Control the bucket objects had. The Installers and Legacy appcast workflows, r2-put.sh, and their R2 write credential are gone. The dev notes move to the one-commit dev-notes branch, published by Release's dev-notes job with GITHUB_TOKEN only; the Worker proxies that file at /hex/files/dev-notes.json (falling back to the bucket copy until the first dev release creates the branch) and renders /hex/dev from it. Both site Workers now bind hex-production-files, read-only in code, for the frozen 2.3.1 feeds and artifacts, which lets hex-dev-files go. The Site build runs the installer test and appcast check the removed workflows ran, and the verify job compares the served bytes. * docs: the site owns /hex/files and needs no R2 write credential Hosting, secrets, old clients, and Linux packages describe the built installers and appcast, the dev-notes branch, and the read-only bucket.
28 lines
1.4 KiB
Shell
Executable file
28 lines
1.4 KiB
Shell
Executable file
#!/usr/bin/env bash
|
|
# push-homebrew.sh <cask> <version>: pushes the rendered cask (checked with
|
|
# brew in a job without secrets) to anomalyco/homebrew-tap as Casks/hex.rb
|
|
# with the tap deploy key, anomaly-release. A cask that already
|
|
# matches is left alone, so reruns are no-ops.
|
|
. "$(dirname "$0")/lib.sh"
|
|
|
|
cask=$(posix "$1")
|
|
version=$2
|
|
: "${HOMEBREW_TAP_DEPLOY_KEY:?Set HOMEBREW_TAP_DEPLOY_KEY to the tap deploy key}"
|
|
grep -q "^ version \"$version\"$" "$cask" || die "The cask is not version $version."
|
|
temporary=$(mktemp -d)
|
|
trap 'rm -rf "$temporary"' EXIT
|
|
(umask 077 && printf '%s\n' "$HOMEBREW_TAP_DEPLOY_KEY" > "$temporary/key")
|
|
# github.com's published ED25519 host key.
|
|
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' > "$temporary/known_hosts"
|
|
export GIT_SSH_COMMAND="ssh -i $temporary/key -o IdentitiesOnly=yes -o UserKnownHostsFile=$temporary/known_hosts -o StrictHostKeyChecking=yes"
|
|
git clone -q --depth 1 git@github.com:anomalyco/homebrew-tap.git "$temporary/tap"
|
|
cp "$cask" "$temporary/tap/Casks/hex.rb"
|
|
cd "$temporary/tap"
|
|
git add Casks/hex.rb
|
|
if git diff --cached --quiet; then
|
|
echo "anomalyco/tap/hex already serves $version." >&2
|
|
exit 0
|
|
fi
|
|
git -c user.name='Hex release' -c user.email='hex@anoma.ly' commit -qm "hex $version"
|
|
git push -q origin HEAD
|
|
echo "https://github.com/anomalyco/homebrew-tap/blob/$(git rev-parse HEAD)/Casks/hex.rb"
|