Skip to content

feat: initial scaffold#1

Merged
smartwatermelon merged 3 commits intomainfrom
claude/feature-scaffold-20260311
Mar 11, 2026
Merged

feat: initial scaffold#1
smartwatermelon merged 3 commits intomainfrom
claude/feature-scaffold-20260311

Conversation

@smartwatermelon
Copy link
Copy Markdown
Owner

Adds the full project scaffold: installation script, mirror list, and GitHub Actions workflows.

What's included

install.sh — idempotent macOS DNS override installer

  • Creates /etc/resolver/archive.today with the configured nameserver
  • Symlinks all other mirror domains to the primary file
  • Tracks managed entries in a manifest; removes stale entries on re-run
  • --update-mirrors fetches the current mirror list from the Wikipedia API (no root needed)
  • --dry-run, --uninstall, --no-fetch, --nameserver, --yes

mirrors.txt — domain list parsed from the Archive.today Wikipedia article; first entry is the primary

.github/workflows/ci.yml — ShellCheck, bash syntax, and mirrors.txt format validation on every push/PR

.github/workflows/release.yml — creates a GitHub release on vX.Y.Z tags; verifies the tag matches SCRIPT_VERSION in install.sh

.github/workflows/update-mirrors.yml — runs the first Monday of each month; diffs the Wikipedia mirror list against mirrors.txt and opens a PR if the set has changed

Notes

  • Mirror list is not maintained manually — CI keeps it current
  • --update-mirrors extracts domains from <li>archive.TLD</li> elements in the Wikipedia infobox (precise; avoids false positives like archive.org)
  • Comparison is set-based, so reordering alone does not trigger an update

Adds idempotent macOS DNS override installer for archive.today and
mirrors, plus GitHub Actions workflows for CI and automated mirror
list maintenance.

- install.sh: idempotent script that writes /etc/resolver files
  (primary resolver + symlinks), tracks managed entries via manifest,
  removes stale entries, flushes DNS cache. Supports --update-mirrors
  (fetches live mirror list from Wikipedia API, no root needed),
  --dry-run, --uninstall, --no-fetch, --nameserver, --yes.
- mirrors.txt: domain list sourced from Wikipedia; first entry is the
  primary (gets a resolver file), rest become symlinks to it.
- .github/workflows/ci.yml: ShellCheck lint, bash syntax check,
  mirrors.txt format validation on every push/PR.
- .github/workflows/release.yml: creates GitHub release on vX.Y.Z
  tags; verifies tag matches SCRIPT_VERSION in install.sh.
- .github/workflows/update-mirrors.yml: runs first Monday of each
  month, diffs Wikipedia mirror list against mirrors.txt, opens a PR
  if the set has changed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread .github/workflows/update-mirrors.yml Outdated
DIFF_SUMMARY was computed in the 'Create pull request' step by diffing
mirrors.txt against /tmp/ordered_domains.txt — but mirrors.txt had
already been overwritten with the new content, so the diff was always
empty and the PR body always read 'See diff'.

Fix: capture the diff as a step output in the 'check' step (before the
overwrite), then reference it via steps.check.outputs.diff_summary in
the 'Create pull request' step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread install.sh Outdated
export on a bash array only serialises element [0] to child processes;
relying on an implicit global inside a $() subshell is fragile and
misleading. Instead, pass both arrays as positional arguments using a
"--" delimiter, and parse them inside the function.

Also guard against the empty-manifest edge case: when no manifest file
exists yet, "${MANIFEST_DOMAINS[@]:-}" expands to a single empty string,
which was being treated as a domain to remove. Skip empty entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smartwatermelon smartwatermelon merged commit 1a8e113 into main Mar 11, 2026
4 checks passed
@smartwatermelon smartwatermelon deleted the claude/feature-scaffold-20260311 branch March 11, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant