From 7b6c448ef6590eaf1d53af98b4a531dcb7ac4c50 Mon Sep 17 00:00:00 2001 From: Brendan-Lim <121050815+Brendan-Lim@users.noreply.github.com> Date: Sat, 21 Nov 2026 23:30:49 +0800 Subject: [PATCH] fix: point release scripts and cask templates at bstack-tools/ContextLens --- .github/workflows/unnotarized-stable.yml | 2 +- distribution/homebrew/Casks/contextlens-preview.rb.in | 4 ++-- distribution/homebrew/Casks/contextlens-unnotarized.rb.in | 4 ++-- distribution/homebrew/Casks/contextlens.rb.in | 4 ++-- docs/preview-releases.md | 2 +- scripts/preview-release.py | 2 +- scripts/publish-release.sh | 4 ++-- scripts/release.py | 2 +- scripts/tests/test_preview_release.py | 6 +++--- scripts/update-homebrew.py | 8 ++++---- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/unnotarized-stable.yml b/.github/workflows/unnotarized-stable.yml index 681cc6d..8d02907 100644 --- a/.github/workflows/unnotarized-stable.yml +++ b/.github/workflows/unnotarized-stable.yml @@ -89,7 +89,7 @@ jobs: python3 -c 'import os,re; assert re.fullmatch(r"[1-9][0-9]*", os.environ["CANDIDATE_RUN_ID"])' - run: python3 -m pip install --require-hashes -r distribution/dmg/requirements.txt - name: Download existing candidate without rebuilding it - run: gh run download "$CANDIDATE_RUN_ID" --repo Brendan-Lim/ContextLens --name "official-candidate-$RELEASE_VERSION" --dir "$RUNNER_TEMP/official-assets" + run: gh run download "$CANDIDATE_RUN_ID" --repo bstack-tools/ContextLens --name "official-candidate-$RELEASE_VERSION" --dir "$RUNNER_TEMP/official-assets" - name: Audit reviewed source and verify acceptance before promotion run: | python3 scripts/audit-public-files.py diff --git a/distribution/homebrew/Casks/contextlens-preview.rb.in b/distribution/homebrew/Casks/contextlens-preview.rb.in index 264d44f..10991ce 100644 --- a/distribution/homebrew/Casks/contextlens-preview.rb.in +++ b/distribution/homebrew/Casks/contextlens-preview.rb.in @@ -2,11 +2,11 @@ cask "contextlens-preview" do version "__VERSION__,__ASSET_ID__" sha256 "__SHA256__" - url "https://api.github.com/repos/Brendan-Lim/ContextLens/releases/assets/#{version.csv.second}", + url "https://api.github.com/repos/bstack-tools/ContextLens/releases/assets/#{version.csv.second}", header: "Accept: application/octet-stream" name "ContextLens Preview" desc "Unnotarized preview of local window capture for coding agents" - homepage "https://github.com/Brendan-Lim/ContextLens/" + homepage "https://github.com/bstack-tools/ContextLens/" livecheck do skip "Preview releases are updated explicitly after verification" diff --git a/distribution/homebrew/Casks/contextlens-unnotarized.rb.in b/distribution/homebrew/Casks/contextlens-unnotarized.rb.in index e63b3f2..0966110 100644 --- a/distribution/homebrew/Casks/contextlens-unnotarized.rb.in +++ b/distribution/homebrew/Casks/contextlens-unnotarized.rb.in @@ -2,11 +2,11 @@ cask "contextlens" do version "__VERSION__,__ASSET_ID__" sha256 "__SHA256__" - url "https://api.github.com/repos/Brendan-Lim/ContextLens/releases/assets/#{version.csv.second}", + url "https://api.github.com/repos/bstack-tools/ContextLens/releases/assets/#{version.csv.second}", header: "Accept: application/octet-stream" name "ContextLens" desc "Capture and annotate window states for coding agents" - homepage "https://github.com/Brendan-Lim/ContextLens" + homepage "https://github.com/bstack-tools/ContextLens" conflicts_with cask: "contextlens-preview" depends_on arch: :arm64 diff --git a/distribution/homebrew/Casks/contextlens.rb.in b/distribution/homebrew/Casks/contextlens.rb.in index 3373bf4..c01072b 100644 --- a/distribution/homebrew/Casks/contextlens.rb.in +++ b/distribution/homebrew/Casks/contextlens.rb.in @@ -2,10 +2,10 @@ cask "contextlens" do version "__VERSION__" sha256 "__SHA256__" - url "https://github.com/Brendan-Lim/ContextLens/releases/download/v#{version}/ContextLens-#{version}-arm64.zip" + url "https://github.com/bstack-tools/ContextLens/releases/download/v#{version}/ContextLens-#{version}-arm64.zip" name "ContextLens" desc "Capture and annotate window states for coding agents" - homepage "https://github.com/Brendan-Lim/ContextLens" + homepage "https://github.com/bstack-tools/ContextLens" depends_on arch: :arm64 depends_on macos: ">= :sonoma" diff --git a/docs/preview-releases.md b/docs/preview-releases.md index 81cb908..4e8a568 100644 --- a/docs/preview-releases.md +++ b/docs/preview-releases.md @@ -17,7 +17,7 @@ During verification GitHub's browser asset URL returned HTTP 504, while the offi ```sh curl --fail --location --header 'Accept: application/octet-stream' \ --output ContextLens-0.3.0-preview.1-arm64.zip \ - https://api.github.com/repos/Brendan-Lim/ContextLens/releases/assets/723563642 + https://api.github.com/repos/bstack-tools/ContextLens/releases/assets/723563642 shasum -a 256 ContextLens-0.3.0-preview.1-arm64.zip ``` diff --git a/scripts/preview-release.py b/scripts/preview-release.py index 1ec5635..2c23521 100644 --- a/scripts/preview-release.py +++ b/scripts/preview-release.py @@ -11,7 +11,7 @@ from release import ROOT, archive_members, metadata, require, run, verify -REPO = 'Brendan-Lim/ContextLens' +REPO = 'bstack-tools/ContextLens' TRUST = 'unnotarized-adhoc-preview' diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 0f20013..eae8190 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -32,6 +32,6 @@ Homebrew installation becomes available after the tap update is validated. EOF # A draft ensures assets arrive before visibility. Never use --clobber or --force. # gh creates the new tag at this exact source commit; no existing tag is moved. -gh release create "v$version" --repo Brendan-Lim/ContextLens --target "$(git rev-parse HEAD)" --draft --title "ContextLens $version" --notes-file "$notes" \ +gh release create "v$version" --repo bstack-tools/ContextLens --target "$(git rev-parse HEAD)" --draft --title "ContextLens $version" --notes-file "$notes" \ "$asset_dir/$asset" "$asset_dir/$asset.sha256" "$asset_dir/$asset.json" -gh release edit "v$version" --repo Brendan-Lim/ContextLens --draft=false --latest +gh release edit "v$version" --repo bstack-tools/ContextLens --draft=false --latest diff --git a/scripts/release.py b/scripts/release.py index ee4777d..c565fc7 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -160,7 +160,7 @@ def preflight(version): tag = 'v' + version refs = run('git', '-C', ROOT, 'tag', '--list', tag).strip() require(not refs, 'Version tag already exists; choose a new version') - releases = json.loads(run('gh', 'api', 'repos/Brendan-Lim/ContextLens/releases', '--paginate', '--slurp')) + releases = json.loads(run('gh', 'api', 'repos/bstack-tools/ContextLens/releases', '--paginate', '--slurp')) require(not any(r['tag_name'] == tag for page in releases for r in page), 'Release already exists') print('Release source preflight passed: ' + tag) diff --git a/scripts/tests/test_preview_release.py b/scripts/tests/test_preview_release.py index a499b2b..52eae29 100644 --- a/scripts/tests/test_preview_release.py +++ b/scripts/tests/test_preview_release.py @@ -86,7 +86,7 @@ def test_cask_requires_actual_sha_and_discloses_trust(self): text = preview.render_cask(VERSION, 'a' * 64, 123) self.assertIn('cask "contextlens-preview"', text) self.assertIn(f'version "{VERSION},123"', text) - self.assertIn('https://api.github.com/repos/Brendan-Lim/ContextLens/releases/assets/#{version.csv.second}', text) + self.assertIn('https://api.github.com/repos/bstack-tools/ContextLens/releases/assets/#{version.csv.second}', text) self.assertIn('Accept: application/octet-stream', text) self.assertIn('conflicts_with cask: "contextlens"', text) self.assertIn('Unnotarized', text) @@ -98,9 +98,9 @@ def test_published_preview_and_exact_uploaded_assets_are_required(self): version = VERSION name = f'ContextLens-{version}-arm64.zip' info = dict(tag_name='v' + version, draft=False, prerelease=True, published_at='now', - assets=[dict(id=i, url=f'https://api.github.com/repos/Brendan-Lim/ContextLens/releases/assets/{i}', + assets=[dict(id=i, url=f'https://api.github.com/repos/bstack-tools/ContextLens/releases/assets/{i}', name=n, state='uploaded', browser_download_url= - f'https://github.com/Brendan-Lim/ContextLens/releases/download/v{version}/{n}') + f'https://github.com/bstack-tools/ContextLens/releases/download/v{version}/{n}') for i, n in enumerate([name, name + '.sha256', name + '.json'], 123)]) preview.published_assets(info, version) for change in [dict(draft=True), dict(prerelease=False), dict(assets=[]), dict(tag_name='v' + BASE)]: diff --git a/scripts/update-homebrew.py b/scripts/update-homebrew.py index 715eae1..6cd1a38 100644 --- a/scripts/update-homebrew.py +++ b/scripts/update-homebrew.py @@ -45,7 +45,7 @@ def main(): require(subprocess.check_output(['git', '-C', str(tap), 'remote', 'get-url', 'origin'], text=True).strip() in ['https://github.com/Brendan-Lim/homebrew-tap.git', 'https://github.com/Brendan-Lim/homebrew-tap', 'git@github.com:Brendan-Lim/homebrew-tap.git'], 'Unexpected tap remote') require(not subprocess.check_output(['git', '-C', str(tap), 'status', '--porcelain'], text=True).strip(), 'Tap must be clean before updating') tag = 'v' + args.version - info = json.loads(subprocess.check_output(['gh', 'api', f'repos/Brendan-Lim/ContextLens/releases/tags/{tag}'], text=True)) + info = json.loads(subprocess.check_output(['gh', 'api', f'repos/bstack-tools/ContextLens/releases/tags/{tag}'], text=True)) require(info['tag_name'] == tag and not info['draft'] and not info['prerelease'] and info['published_at'], 'A published stable release is required') name = f'ContextLens-{args.version}-arm64.zip' official = official_helpers() if args.unnotarized_official else None @@ -53,14 +53,14 @@ def main(): for asset in assets: matching = [a for a in info['assets'] if a['name'] == asset] require(len(matching) == 1 and matching[0]['state'] == 'uploaded', 'Missing or ambiguous release asset') - require(matching[0]['browser_download_url'] == f'https://github.com/Brendan-Lim/ContextLens/releases/download/{tag}/{asset}', 'Unexpected release download URL') + require(matching[0]['browser_download_url'] == f'https://github.com/bstack-tools/ContextLens/releases/download/{tag}/{asset}', 'Unexpected release download URL') with tempfile.TemporaryDirectory(prefix='contextlens-tap-update-') as temporary: patterns = [item for asset in assets for item in ['--pattern', asset]] - subprocess.run(['gh', 'release', 'download', tag, '--repo', 'Brendan-Lim/ContextLens', '--dir', temporary, *patterns], check=True) + subprocess.run(['gh', 'release', 'download', tag, '--repo', 'bstack-tools/ContextLens', '--dir', temporary, *patterns], check=True) receipt = official.verify_assets(temporary) if official else verify_archive(Path(temporary) / name) if official: official.acceptance(json.loads((Path(temporary) / 'acceptance.json').read_text()), receipt) - commit = json.loads(subprocess.check_output(['gh', 'api', f'repos/Brendan-Lim/ContextLens/commits/{tag}'], text=True)) + commit = json.loads(subprocess.check_output(['gh', 'api', f'repos/bstack-tools/ContextLens/commits/{tag}'], text=True)) require(receipt.get('sourceCommit') == commit['sha'], 'Receipt source commit differs from the published tag') # Trust the expected signing team, not a receipt's self-asserted trust field. asset_id = next(a['id'] for a in info['assets'] if a['name'] == name)