···4545checksum:
4646 name_template: 'checksums.txt'
47474848+brews:
4949+ - name: docker-credential-atcr
5050+ ids:
5151+ - credential-helper
5252+ repository:
5353+ # DID-based owner keeps this stable across Tangled handle renames.
5454+ # Replace TAP_REPO_DID with the did:plc of the tap repo once created.
5555+ owner: 'did:plc:TAP_REPO_DID'
5656+ name: homebrew-tap
5757+ branch: main
5858+ git:
5959+ url: 'git@knot1.tangled.sh:did:plc:TAP_REPO_DID/homebrew-tap'
6060+ private_key: '{{ .Env.TAP_SSH_KEY }}'
6161+ directory: Formula
6262+ url_template: "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v{{ .Version }}/download/{{ .ArtifactName }}"
6363+ homepage: "https://atcr.io"
6464+ description: "Docker credential helper for ATCR (ATProto Container Registry)"
6565+ license: "MIT"
6666+ commit_author:
6767+ name: atcr-bot
6868+ email: releases@atcr.io
6969+ commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
7070+ install: |
7171+ bin.install "docker-credential-atcr"
7272+ test: |
7373+ assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1")
7474+ caveats: |
7575+ To finish setup, run:
7676+ docker-credential-atcr configure-docker
7777+7878+ This writes the credential helper entry to ~/.docker/config.json. Or
7979+ add manually:
8080+ {
8181+ "credHelpers": {
8282+ "atcr.io": "atcr"
8383+ }
8484+ }
8585+8686+ Then push an image to trigger device authorization:
8787+ docker push atcr.io/<your-handle>/<image>:latest
8888+8989+ Credentials live in ~/.atcr/device.json (0600).
9090+4891snapshot:
4992 version_template: "{{ incpatch .Version }}-next"
5093
-59
Formula/docker-credential-atcr.rb
···11-# typed: false
22-# frozen_string_literal: true
33-44-class DockerCredentialAtcr < Formula
55- desc "Docker credential helper for ATCR (ATProto Container Registry)"
66- homepage "https://atcr.io"
77- version "0.0.1"
88- license "MIT"
99-1010- on_macos do
1111- on_arm do
1212- url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Darwin_arm64.tar.gz"
1313- sha256 "REPLACE_WITH_SHA256"
1414- end
1515- on_intel do
1616- url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Darwin_x86_64.tar.gz"
1717- sha256 "REPLACE_WITH_SHA256"
1818- end
1919- end
2020-2121- on_linux do
2222- on_arm do
2323- url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Linux_arm64.tar.gz"
2424- sha256 "REPLACE_WITH_SHA256"
2525- end
2626- on_intel do
2727- url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Linux_x86_64.tar.gz"
2828- sha256 "REPLACE_WITH_SHA256"
2929- end
3030- end
3131-3232- def install
3333- bin.install "docker-credential-atcr"
3434- end
3535-3636- test do
3737- assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1")
3838- end
3939-4040- def caveats
4141- <<~EOS
4242- To configure Docker to use ATCR credential helper, add the following
4343- to your ~/.docker/config.json:
4444-4545- {
4646- "credHelpers": {
4747- "atcr.io": "atcr"
4848- }
4949- }
5050-5151- Or run: docker-credential-atcr configure-docker
5252-5353- To authenticate with ATCR:
5454- docker push atcr.io/<your-handle>/<image>:latest
5555-5656- Configuration is stored in: ~/.atcr/config.json
5757- EOS
5858- end
5959-end
+4-3
INSTALLATION.md
···4040### Using Homebrew (macOS and Linux)
41414242```bash
4343-# Add the ATCR tap
4444-brew tap atcr-io/tap
4343+# Add the ATCR tap (hosted on Tangled, so pass the URL explicitly).
4444+# DID-based URL is stable across any future handle rename.
4545+brew tap atcr/tap https://tangled.org/did:plc:TAP_REPO_DID/homebrew-tap
45464647# Install the credential helper
4748brew install docker-credential-atcr
···55565657### Manual Installation
57585858-1. **Download the binary** for your platform from [GitHub Releases](https://github.com/atcr-io/atcr/releases)
5959+1. **Download the binary** for your platform from [Tangled tags](https://tangled.org/evan.jarrett.net/at-container-registry/tags)
59606061 - Linux amd64: `docker-credential-atcr_VERSION_Linux_x86_64.tar.gz`
6162 - Linux arm64: `docker-credential-atcr_VERSION_Linux_arm64.tar.gz`
-221
scripts/update-homebrew-formula.sh
···11-#!/usr/bin/env bash
22-#
33-# update-homebrew-formula.sh - Update Homebrew formula after a GoReleaser release
44-#
55-# Usage: ./scripts/update-homebrew-formula.sh <version> [--push]
66-#
77-# Example: ./scripts/update-homebrew-formula.sh v0.0.2
88-# ./scripts/update-homebrew-formula.sh v0.0.2 --push
99-#
1010-# This script:
1111-# 1. Downloads pre-built archives from Tangled for each platform
1212-# 2. Computes SHA256 checksums
1313-# 3. Generates the updated formula
1414-# 4. Optionally clones the homebrew-tap repo, commits, and pushes
1515-#
1616-# If GoReleaser dist/ directory exists locally, checksums are read from there instead.
1717-#
1818-1919-set -euo pipefail
2020-2121-RED='\033[0;31m'
2222-GREEN='\033[0;32m'
2323-YELLOW='\033[1;33m'
2424-NC='\033[0m'
2525-2626-TANGLED_REPO="https://tangled.org/evan.jarrett.net/at-container-registry"
2727-TAP_REPO="https://tangled.org/evan.jarrett.net/homebrew-tap"
2828-BINARY_NAME="docker-credential-atcr"
2929-FORMULA_PATH="Formula/docker-credential-atcr.rb"
3030-3131-PLATFORMS=(
3232- "Darwin_arm64"
3333- "Darwin_x86_64"
3434- "Linux_arm64"
3535- "Linux_x86_64"
3636-)
3737-3838-if [ $# -lt 1 ]; then
3939- echo -e "${RED}Error: Missing required argument${NC}"
4040- echo "Usage: $0 <version> [--push]"
4141- echo ""
4242- echo "Example: $0 v0.0.2"
4343- echo " $0 v0.0.2 --push"
4444- exit 1
4545-fi
4646-4747-VERSION="$1"
4848-PUSH=false
4949-if [ "${2:-}" = "--push" ]; then
5050- PUSH=true
5151-fi
5252-5353-# Add 'v' prefix if not present
5454-if [[ ! "$VERSION" =~ ^v ]]; then
5555- VERSION="v${VERSION}"
5656-fi
5757-VERSION_NO_V="${VERSION#v}"
5858-5959-echo -e "${GREEN}Updating Homebrew formula for ${VERSION}${NC}"
6060-echo ""
6161-6262-TEMP_DIR=$(mktemp -d)
6363-trap 'rm -rf "$TEMP_DIR"' EXIT
6464-6565-# Compute SHA256 for each platform archive
6666-declare -A CHECKSUMS
6767-6868-sha256_of_file() {
6969- if command -v sha256sum &> /dev/null; then
7070- sha256sum "$1" | awk '{print $1}'
7171- elif command -v shasum &> /dev/null; then
7272- shasum -a 256 "$1" | awk '{print $1}'
7373- else
7474- echo -e "${RED}Error: sha256sum or shasum not found${NC}" >&2
7575- exit 1
7676- fi
7777-}
7878-7979-# Check if GoReleaser dist/ has the archives locally
8080-GORELEASER_DIST="dist"
8181-if [ -f "${GORELEASER_DIST}/checksums.txt" ]; then
8282- echo -e "${YELLOW}Using local GoReleaser dist/ for checksums${NC}"
8383- for platform in "${PLATFORMS[@]}"; do
8484- archive="${BINARY_NAME}_${VERSION_NO_V}_${platform}.tar.gz"
8585- checksum=$(grep "${archive}" "${GORELEASER_DIST}/checksums.txt" | awk '{print $1}')
8686- if [ -z "$checksum" ]; then
8787- echo -e "${RED}Missing checksum for ${archive} in dist/checksums.txt${NC}"
8888- exit 1
8989- fi
9090- CHECKSUMS[$platform]="$checksum"
9191- echo -e " ${GREEN}✓${NC} ${platform}: ${checksum}"
9292- done
9393-else
9494- echo -e "${YELLOW}Downloading archives from Tangled to compute checksums...${NC}"
9595- for platform in "${PLATFORMS[@]}"; do
9696- archive="${BINARY_NAME}_${VERSION_NO_V}_${platform}.tar.gz"
9797- url="${TANGLED_REPO}/tags/${VERSION}/download/${archive}"
9898- dest="${TEMP_DIR}/${archive}"
9999-100100- echo -n " ${platform}... "
101101- if curl -sSfL -o "$dest" "$url"; then
102102- CHECKSUMS[$platform]=$(sha256_of_file "$dest")
103103- echo -e "${GREEN}✓${NC} ${CHECKSUMS[$platform]}"
104104- else
105105- echo -e "${RED}✗ Failed to download${NC}"
106106- echo " URL: ${url}"
107107- exit 1
108108- fi
109109- done
110110-fi
111111-112112-echo ""
113113-114114-# Generate the formula
115115-FORMULA=$(cat <<RUBY
116116-# typed: false
117117-# frozen_string_literal: true
118118-119119-class DockerCredentialAtcr < Formula
120120- desc "Docker credential helper for ATCR (ATProto Container Registry)"
121121- homepage "https://atcr.io"
122122- version "${VERSION_NO_V}"
123123- license "MIT"
124124-125125- on_macos do
126126- on_arm do
127127- url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Darwin_arm64.tar.gz"
128128- sha256 "${CHECKSUMS[Darwin_arm64]}"
129129- end
130130- on_intel do
131131- url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Darwin_x86_64.tar.gz"
132132- sha256 "${CHECKSUMS[Darwin_x86_64]}"
133133- end
134134- end
135135-136136- on_linux do
137137- on_arm do
138138- url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Linux_arm64.tar.gz"
139139- sha256 "${CHECKSUMS[Linux_arm64]}"
140140- end
141141- on_intel do
142142- url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Linux_x86_64.tar.gz"
143143- sha256 "${CHECKSUMS[Linux_x86_64]}"
144144- end
145145- end
146146-147147- def install
148148- bin.install "docker-credential-atcr"
149149- end
150150-151151- test do
152152- assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1")
153153- end
154154-155155- def caveats
156156- <<~EOS
157157- To configure Docker to use ATCR credential helper, add the following
158158- to your ~/.docker/config.json:
159159-160160- {
161161- "credHelpers": {
162162- "atcr.io": "atcr"
163163- }
164164- }
165165-166166- Or run: docker-credential-atcr configure-docker
167167-168168- To authenticate with ATCR:
169169- docker push atcr.io/<your-handle>/<image>:latest
170170-171171- Configuration is stored in: ~/.atcr/config.json
172172- EOS
173173- end
174174-end
175175-RUBY
176176-)
177177-178178-# Write to local formula
179179-echo "$FORMULA" > "${FORMULA_PATH}"
180180-echo -e "${GREEN}✓ Updated ${FORMULA_PATH}${NC}"
181181-182182-if [ "$PUSH" = true ]; then
183183- echo ""
184184- echo -e "${YELLOW}Pushing to homebrew-tap repo...${NC}"
185185-186186- TAP_DIR="${TEMP_DIR}/homebrew-tap"
187187- git clone "$TAP_REPO" "$TAP_DIR" 2>/dev/null || {
188188- echo -e "${YELLOW}Tap repo not found, initializing new repo${NC}"
189189- mkdir -p "$TAP_DIR"
190190- cd "$TAP_DIR"
191191- git init
192192- git remote add origin "$TAP_REPO"
193193- }
194194-195195- mkdir -p "${TAP_DIR}/Formula"
196196- cp "${FORMULA_PATH}" "${TAP_DIR}/Formula/"
197197-198198- cd "$TAP_DIR"
199199- git add Formula/docker-credential-atcr.rb
200200- git commit -m "Update docker-credential-atcr to ${VERSION}"
201201- git push origin HEAD
202202-203203- echo -e "${GREEN}✓ Pushed to ${TAP_REPO}${NC}"
204204-else
205205- echo ""
206206- echo -e "${YELLOW}Next steps:${NC}"
207207- echo "1. Review the formula: ${FORMULA_PATH}"
208208- echo "2. Push to your homebrew-tap repo on Tangled:"
209209- echo " cd /path/to/homebrew-tap"
210210- echo " cp ${FORMULA_PATH} Formula/"
211211- echo " git add Formula/ && git commit -m 'Update to ${VERSION}' && git push"
212212- echo ""
213213- echo "Or re-run with --push to do this automatically:"
214214- echo " $0 ${VERSION} --push"
215215-fi
216216-217217-echo ""
218218-echo -e "${GREEN}Users can install/upgrade with:${NC}"
219219-echo " brew tap atcr/tap ${TAP_REPO}"
220220-echo " brew install docker-credential-atcr"
221221-echo " brew upgrade docker-credential-atcr"