Skip to content

Commit d342eae

Browse files
committed
docs(packaging): scaffold Homebrew / winget / Scoop manifests
Add canonical package-manager manifests under packaging/ for the three channels the v0.1.0 release ships to: - Homebrew Cask — Casks/open-codesign.rb, two DMG URLs (arm64 + x64) with a Gatekeeper caveat surfacing the xattr workaround since we don't sign in v0.1. - winget — the three-file manifest tree under manifests/o/OpenCoworkAI/open-codesign/0.1.0/ that microsoft/winget-pkgs expects, both x64 and arm64 installers. - Scoop — open-codesign.json for a future OpenCoworkAI/scoop-bucket with checkver + autoupdate wired up. \`packaging/update-shas.sh\` is the release-time helper: it fetches the GitHub Release artifacts (or hashes a local directory), drops the real SHA256s into the REPLACE_WITH_*_SHA256 placeholders, and also bumps version strings where needed. Run it once the release is live, commit the diff, then mirror the per-channel files to the downstream repos. README / README.zh-CN: replace the single "download from Releases" blurb with a "Install via package manager (recommended) / direct download" split so the brew / winget / scoop one-liners are the first thing users see.
1 parent 1f3b913 commit d342eae

10 files changed

Lines changed: 361 additions & 11 deletions

File tree

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,33 @@ _Demo video coming soon._
5151

5252
## Quickstart
5353

54-
### 1. Download
54+
### 1. Install
5555

56-
Get the latest installer from [GitHub Releases](https://github.com/OpenCoworkAI/open-codesign/releases):
56+
**Package managers** (recommended):
57+
58+
```sh
59+
# macOS — Homebrew
60+
brew tap OpenCoworkAI/tap
61+
brew install --cask open-codesign
62+
63+
# Windows — winget
64+
winget install OpenCoworkAI.open-codesign
65+
66+
# Windows — Scoop
67+
scoop bucket add opencowork https://github.com/OpenCoworkAI/scoop-bucket
68+
scoop install opencowork/open-codesign
69+
```
70+
71+
**Direct download** from [GitHub Releases](https://github.com/OpenCoworkAI/open-codesign/releases):
5772

5873
| Platform | File |
5974
|---|---|
6075
| macOS (Apple Silicon) | `open-codesign-*-arm64.dmg` |
61-
| macOS (Intel) | `open-codesign-*-x64.dmg` |
62-
| Windows | `open-codesign-*-Setup.exe` |
76+
| macOS (Intel) | `open-codesign-*.dmg` |
77+
| Windows (x64 / arm64) | `open-codesign-*-setup.exe` |
6378
| Linux | `open-codesign-*.AppImage` |
6479

65-
> **v0.1 note:** installers are unsigned. macOS: right-click → Open. Windows: More info → Run anyway.
80+
> **v0.1 note:** installers are unsigned. macOS: right-click → Open, or run `xattr -d com.apple.quarantine /Applications/open-codesign.app` after install. Windows: SmartScreen → More info → Run anyway.
6681
> Want a verified build? Compile from source — see [CONTRIBUTING.md](./CONTRIBUTING.md).
6782
6883
### 2. Add your API key

README.zh-CN.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,33 @@ _演示视频即将上线。_
5151

5252
## 快速开始
5353

54-
### 1. 下载安装包
54+
### 1. 安装
5555

56-
[GitHub Releases](https://github.com/OpenCoworkAI/open-codesign/releases) 下载:
56+
**包管理器**(推荐):
57+
58+
```sh
59+
# macOS — Homebrew
60+
brew tap OpenCoworkAI/tap
61+
brew install --cask open-codesign
62+
63+
# Windows — winget
64+
winget install OpenCoworkAI.open-codesign
65+
66+
# Windows — Scoop
67+
scoop bucket add opencowork https://github.com/OpenCoworkAI/scoop-bucket
68+
scoop install opencowork/open-codesign
69+
```
70+
71+
**直接下载**[GitHub Releases](https://github.com/OpenCoworkAI/open-codesign/releases)
5772

5873
| 平台 | 文件 |
5974
|---|---|
6075
| macOS(Apple Silicon)| `open-codesign-*-arm64.dmg` |
61-
| macOS(Intel)| `open-codesign-*-x64.dmg` |
62-
| Windows | `open-codesign-*-Setup.exe` |
76+
| macOS(Intel)| `open-codesign-*.dmg` |
77+
| Windows(x64 / arm64)| `open-codesign-*-setup.exe` |
6378
| Linux | `open-codesign-*.AppImage` |
6479

65-
> **v0.1 说明:** 安装包暂未签名。macOS:右键 → 打开。Windows:更多信息 → 仍要运行。
80+
> **v0.1 说明:** 安装包暂未签名。macOS:右键 → 打开,或安装后在终端执行 `xattr -d com.apple.quarantine /Applications/open-codesign.app`。Windows:SmartScreen → 更多信息 → 仍要运行。
6681
> 需要已验证的构建?请从源码自行编译,参见 [CONTRIBUTING.md](./CONTRIBUTING.md)
6782
6883
### 2. 添加 API Key

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"**/node_modules/**",
1414
"**/coverage/**",
1515
"**/.turbo/**",
16-
"**/vendor/**"
16+
"**/vendor/**",
17+
"packaging/**"
1718
]
1819
},
1920
"formatter": {

packaging/README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Distribution channels
2+
3+
Canonical sources for Open CoDesign's package manager manifests. The `packaging/` tree is the source of truth; after each release we run `update-shas.sh` to fill in checksums, commit here, then mirror the per-channel files to the downstream repos listed below.
4+
5+
All artifacts are **unsigned** for the v0.1 line. Each channel's README / caveats explains the Gatekeeper or SmartScreen workaround.
6+
7+
## Layout
8+
9+
```
10+
packaging/
11+
├── homebrew/
12+
│ └── Casks/open-codesign.rb
13+
├── winget/
14+
│ └── manifests/o/OpenCoworkAI/open-codesign/<version>/
15+
│ ├── OpenCoworkAI.open-codesign.yaml
16+
│ ├── OpenCoworkAI.open-codesign.installer.yaml
17+
│ └── OpenCoworkAI.open-codesign.locale.en-US.yaml
18+
├── scoop/
19+
│ └── bucket/open-codesign.json
20+
└── update-shas.sh
21+
```
22+
23+
## Release flow
24+
25+
1. Push a `vX.Y.Z` tag — `release.yml` builds and publishes the DMG / EXE / AppImage on GitHub Releases.
26+
2. Once the release is live, run from the repo root:
27+
28+
```sh
29+
./packaging/update-shas.sh
30+
```
31+
32+
It downloads every artifact, computes SHA256, and rewrites the placeholders (`REPLACE_WITH_*_SHA256`) in all three channels' manifests. If you're on slow internet or offline, pass a local directory of pre-downloaded artifacts as the second arg.
33+
34+
3. `git diff packaging/`, sanity-check, commit.
35+
4. Mirror to the downstream repos (see below). The tap and bucket repos watch this tree, so the usual workflow is a copy-push per channel.
36+
37+
## Channel-specific mirroring
38+
39+
### Homebrew Cask — `OpenCoworkAI/homebrew-tap`
40+
41+
The tap is a separate public repo. Clone it, copy `packaging/homebrew/Casks/open-codesign.rb` into its `Casks/`, commit, push.
42+
43+
```sh
44+
# Create the tap repo once:
45+
gh repo create OpenCoworkAI/homebrew-tap --public \
46+
--description "Homebrew tap for Open CoDesign and friends"
47+
git clone git@github.com:OpenCoworkAI/homebrew-tap.git /tmp/homebrew-tap
48+
mkdir -p /tmp/homebrew-tap/Casks
49+
cp packaging/homebrew/Casks/open-codesign.rb /tmp/homebrew-tap/Casks/
50+
cd /tmp/homebrew-tap && git add -A && \
51+
git commit -m "open-codesign 0.1.0" && git push
52+
```
53+
54+
Users install with:
55+
56+
```sh
57+
brew tap OpenCoworkAI/tap
58+
brew install --cask open-codesign
59+
```
60+
61+
### winget — `microsoft/winget-pkgs`
62+
63+
Microsoft's monorepo. Fork it, copy `packaging/winget/manifests/o/OpenCoworkAI/open-codesign/<version>/` into the same path in the fork, open a PR. `wingetcreate validate` is worth running first:
64+
65+
```sh
66+
wingetcreate validate packaging/winget/manifests/o/OpenCoworkAI/open-codesign/0.1.0
67+
```
68+
69+
Users install with:
70+
71+
```pwsh
72+
winget install OpenCoworkAI.open-codesign
73+
```
74+
75+
### Scoop — `OpenCoworkAI/scoop-bucket`
76+
77+
Separate public bucket repo. Copy `packaging/scoop/bucket/open-codesign.json` to its `bucket/` directory.
78+
79+
```sh
80+
gh repo create OpenCoworkAI/scoop-bucket --public \
81+
--description "Scoop bucket for Open CoDesign"
82+
git clone git@github.com:OpenCoworkAI/scoop-bucket.git /tmp/scoop-bucket
83+
mkdir -p /tmp/scoop-bucket/bucket
84+
cp packaging/scoop/bucket/open-codesign.json /tmp/scoop-bucket/bucket/
85+
cd /tmp/scoop-bucket && git add -A && \
86+
git commit -m "open-codesign 0.1.0" && git push
87+
```
88+
89+
Users install with:
90+
91+
```pwsh
92+
scoop bucket add opencowork https://github.com/OpenCoworkAI/scoop-bucket
93+
scoop install opencowork/open-codesign
94+
```
95+
96+
## Signing status
97+
98+
- macOS: **unsigned / not notarized**. On first launch Gatekeeper shows "damaged, move to Trash". Users run `xattr -d com.apple.quarantine /Applications/open-codesign.app`, or right-click the app and choose Open. Caveat text in the cask surfaces this.
99+
- Windows: **unsigned**. SmartScreen will warn; users click "More info" → "Run anyway". No workaround needed beyond that.
100+
- Linux AppImage: runs as-is.
101+
102+
Code signing + notarization is tracked for Stage 2 (Apple Developer ID + Windows EV cert). Once wired up, drop the Gatekeeper caveat from the cask and the SmartScreen note from the Windows READMEs.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
cask "open-codesign" do
2+
version "0.1.0"
3+
4+
on_arm do
5+
url "https://github.com/OpenCoworkAI/open-codesign/releases/download/v#{version}/open-codesign-#{version}-arm64.dmg"
6+
sha256 "REPLACE_WITH_ARM64_SHA256"
7+
end
8+
on_intel do
9+
url "https://github.com/OpenCoworkAI/open-codesign/releases/download/v#{version}/open-codesign-#{version}.dmg"
10+
sha256 "REPLACE_WITH_X64_SHA256"
11+
end
12+
13+
name "Open CoDesign"
14+
desc "Open-source desktop AI design tool — prompt to prototype, BYOK, local-first"
15+
homepage "https://github.com/OpenCoworkAI/open-codesign"
16+
17+
auto_updates false
18+
depends_on macos: ">= :big_sur"
19+
20+
app "open-codesign.app"
21+
22+
# Unsigned build — macOS will refuse the first launch with a generic
23+
# "damaged, move to Trash" dialog. Code-signing + notarization is on the
24+
# Stage-2 roadmap; until then users need the xattr workaround below.
25+
caveats <<~EOS
26+
#{token} is not yet notarized. On first launch macOS may refuse to open
27+
it. To bypass, either right-click the app and choose Open, or run:
28+
29+
xattr -d com.apple.quarantine /Applications/open-codesign.app
30+
31+
You only need to do this once per install/update.
32+
EOS
33+
34+
zap trash: [
35+
"~/Library/Application Support/open-codesign",
36+
"~/Library/Preferences/ai.opencowork.codesign.plist",
37+
"~/Library/Logs/open-codesign",
38+
"~/Library/Saved Application State/ai.opencowork.codesign.savedState",
39+
]
40+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"version": "0.1.0",
3+
"description": "Open-source desktop AI design tool — prompt to prototype, BYOK, local-first",
4+
"homepage": "https://github.com/OpenCoworkAI/open-codesign",
5+
"license": "Apache-2.0",
6+
"architecture": {
7+
"64bit": {
8+
"url": "https://github.com/OpenCoworkAI/open-codesign/releases/download/v0.1.0/open-codesign-0.1.0-x64-setup.exe#/dl.7z",
9+
"hash": "REPLACE_WITH_X64_SHA256"
10+
},
11+
"arm64": {
12+
"url": "https://github.com/OpenCoworkAI/open-codesign/releases/download/v0.1.0/open-codesign-0.1.0-arm64-setup.exe#/dl.7z",
13+
"hash": "REPLACE_WITH_ARM64_SHA256"
14+
}
15+
},
16+
"bin": "open-codesign.exe",
17+
"shortcuts": [
18+
[
19+
"open-codesign.exe",
20+
"Open CoDesign"
21+
]
22+
],
23+
"checkver": {
24+
"github": "https://github.com/OpenCoworkAI/open-codesign"
25+
},
26+
"autoupdate": {
27+
"architecture": {
28+
"64bit": {
29+
"url": "https://github.com/OpenCoworkAI/open-codesign/releases/download/v$version/open-codesign-$version-x64-setup.exe#/dl.7z"
30+
},
31+
"arm64": {
32+
"url": "https://github.com/OpenCoworkAI/open-codesign/releases/download/v$version/open-codesign-$version-arm64-setup.exe#/dl.7z"
33+
}
34+
}
35+
}
36+
}

packaging/update-shas.sh

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env bash
2+
# Populate SHA256 placeholders in every distribution-channel manifest from the
3+
# artifacts attached to a published GitHub Release.
4+
#
5+
# Usage:
6+
# ./packaging/update-shas.sh # uses apps/desktop/package.json version
7+
# ./packaging/update-shas.sh 0.1.0 # override version
8+
# ./packaging/update-shas.sh 0.1.0 local/dir # hash local files in local/dir instead of downloading
9+
#
10+
# After a successful `gh release view vX.Y.Z` run this and commit the diffs.
11+
12+
set -euo pipefail
13+
14+
VERSION="${1:-$(node -p "require('./apps/desktop/package.json').version" 2>/dev/null || echo '0.1.0')}"
15+
LOCAL_DIR="${2:-}"
16+
17+
REPO="OpenCoworkAI/open-codesign"
18+
REL_URL_BASE="https://github.com/${REPO}/releases/download/v${VERSION}"
19+
20+
# electron-builder's default artifact names for the three Windows targets
21+
# and two macOS architectures. Keep these in sync with electron-builder.yml.
22+
MAC_ARM64_DMG="open-codesign-${VERSION}-arm64.dmg"
23+
MAC_X64_DMG="open-codesign-${VERSION}.dmg"
24+
WIN_X64_EXE="open-codesign-${VERSION}-x64-setup.exe"
25+
WIN_ARM64_EXE="open-codesign-${VERSION}-arm64-setup.exe"
26+
27+
tmpdir=$(mktemp -d)
28+
trap 'rm -rf "$tmpdir"' EXIT
29+
30+
fetch_sha() {
31+
local file="$1"
32+
local out="$tmpdir/$file"
33+
if [[ -n "$LOCAL_DIR" && -f "$LOCAL_DIR/$file" ]]; then
34+
cp "$LOCAL_DIR/$file" "$out"
35+
else
36+
local url="${REL_URL_BASE}/${file}"
37+
echo " downloading $url" >&2
38+
curl -fsSL -o "$out" "$url"
39+
fi
40+
shasum -a 256 "$out" | awk '{print $1}'
41+
}
42+
43+
update_placeholder() {
44+
local file="$1" ; local placeholder="$2" ; local sha="$3"
45+
# Perl for portable in-place replace that works on both macOS and Linux.
46+
perl -pi -e "s/\\Q${placeholder}\\E/${sha}/g" "$file"
47+
}
48+
49+
echo "Version: v${VERSION}"
50+
echo ""
51+
echo "Computing SHA256s…"
52+
mac_arm_sha=$(fetch_sha "$MAC_ARM64_DMG")
53+
mac_x64_sha=$(fetch_sha "$MAC_X64_DMG")
54+
win_x64_sha=$(fetch_sha "$WIN_X64_EXE")
55+
win_arm_sha=$(fetch_sha "$WIN_ARM64_EXE")
56+
echo " mac arm64 : $mac_arm_sha"
57+
echo " mac x64 : $mac_x64_sha"
58+
echo " win x64 : $win_x64_sha"
59+
echo " win arm64 : $win_arm_sha"
60+
echo ""
61+
62+
echo "Homebrew cask…"
63+
cask="packaging/homebrew/Casks/open-codesign.rb"
64+
perl -pi -e "s/version \"[0-9.]+\"/version \"${VERSION}\"/" "$cask"
65+
update_placeholder "$cask" "REPLACE_WITH_ARM64_SHA256" "$mac_arm_sha"
66+
update_placeholder "$cask" "REPLACE_WITH_X64_SHA256" "$mac_x64_sha"
67+
68+
echo "winget manifests…"
69+
winget_dir="packaging/winget/manifests/o/OpenCoworkAI/open-codesign/${VERSION}"
70+
# If the user bumped VERSION without renaming the directory, guide them.
71+
if [[ ! -d "$winget_dir" ]]; then
72+
echo " note: $winget_dir does not exist yet. Copy the previous version's"
73+
echo " directory and rerun — this script only updates SHAs, not tree."
74+
else
75+
for f in "$winget_dir"/*.yaml; do
76+
perl -pi -e "s/PackageVersion: [0-9.]+/PackageVersion: ${VERSION}/" "$f"
77+
done
78+
installer="$winget_dir/OpenCoworkAI.open-codesign.installer.yaml"
79+
update_placeholder "$installer" "REPLACE_WITH_X64_SHA256" "$win_x64_sha"
80+
update_placeholder "$installer" "REPLACE_WITH_ARM64_SHA256" "$win_arm_sha"
81+
# Keep InstallerUrl in sync with VERSION too.
82+
perl -pi -e "s/v[0-9.]+\/open-codesign-[0-9.]+-/v${VERSION}\/open-codesign-${VERSION}-/g" "$installer"
83+
fi
84+
85+
echo "scoop manifest…"
86+
scoop="packaging/scoop/bucket/open-codesign.json"
87+
# Replace top-level "version": "...".
88+
perl -pi -e "s/\"version\": \"[0-9.]+\"/\"version\": \"${VERSION}\"/" "$scoop"
89+
perl -pi -e "s/v[0-9.]+\/open-codesign-[0-9.]+-/v${VERSION}\/open-codesign-${VERSION}-/g" "$scoop"
90+
update_placeholder "$scoop" "REPLACE_WITH_X64_SHA256" "$win_x64_sha"
91+
update_placeholder "$scoop" "REPLACE_WITH_ARM64_SHA256" "$win_arm_sha"
92+
93+
echo ""
94+
echo "Done. Review with git diff packaging/, then commit + mirror to the"
95+
echo "downstream tap/bucket/winget-pkgs repos (see packaging/README.md)."
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
PackageIdentifier: OpenCoworkAI.open-codesign
2+
PackageVersion: 0.1.0
3+
InstallerType: nullsoft
4+
Scope: user
5+
UpgradeBehavior: install
6+
Installers:
7+
- Architecture: x64
8+
InstallerUrl: https://github.com/OpenCoworkAI/open-codesign/releases/download/v0.1.0/open-codesign-0.1.0-x64-setup.exe
9+
InstallerSha256: REPLACE_WITH_X64_SHA256
10+
- Architecture: arm64
11+
InstallerUrl: https://github.com/OpenCoworkAI/open-codesign/releases/download/v0.1.0/open-codesign-0.1.0-arm64-setup.exe
12+
InstallerSha256: REPLACE_WITH_ARM64_SHA256
13+
ManifestType: installer
14+
ManifestVersion: 1.6.0

0 commit comments

Comments
 (0)