Skip to content

Commit 6fe6b3b

Browse files
blafourcadeclaude
andcommitted
feat: replace sync-dist.js with aidd-cli for dist generation
Use the CLI to generate per-tool distributions instead of the custom sync-dist.js script, both locally (pnpm build) and in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5990084 commit 6fe6b3b

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
permissions:
99
contents: write
1010
pull-requests: write
11+
packages: read
1112

1213
jobs:
1314
release-please:
@@ -34,8 +35,14 @@ jobs:
3435
with:
3536
node-version: '20'
3637

38+
- name: Install CLI
39+
run: |
40+
npm config set @ai-driven-dev:registry https://npm.pkg.github.com
41+
npm config set //npm.pkg.github.com/:_authToken ${{ github.token }}
42+
npm install -g @ai-driven-dev/aidd-cli
43+
3744
- name: Build distributions
38-
run: node scripts/sync-dist.js
45+
run: bash scripts/build-dist.sh
3946

4047
- name: Build source tarball
4148
run: |
@@ -54,7 +61,9 @@ jobs:
5461
VERSION="${{ needs.release-please.outputs.version }}"
5562
for tool in claude cursor copilot; do
5663
tar czf "/tmp/aidd-${tool}-${VERSION}.tar.gz" \
57-
-C dist/${tool} .
64+
-C dist/${tool} \
65+
--exclude='.aidd' \
66+
.
5867
done
5968
6069
- name: Attach tarballs to release

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"private": true,
33
"scripts": {
4+
"build": "bash scripts/build-dist.sh",
45
"prepare": "lefthook install || true"
56
},
67
"devDependencies": {

scripts/build-dist.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
FRAMEWORK_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
5+
6+
if command -v aidd &>/dev/null; then
7+
CLI="aidd"
8+
else
9+
echo "Error: aidd CLI not found. Install it with: npm install -g @ai-driven-dev/aidd-cli" >&2
10+
exit 1
11+
fi
12+
13+
which aidd && aidd --version
14+
15+
for tool in claude cursor copilot; do
16+
TARGET="$FRAMEWORK_ROOT/dist/$tool"
17+
rm -rf "$TARGET"
18+
mkdir -p "$TARGET"
19+
cd "$TARGET"
20+
"$CLI" --framework "$FRAMEWORK_ROOT" install "$tool" --force
21+
cd "$FRAMEWORK_ROOT"
22+
done

0 commit comments

Comments
 (0)