Skip to content

Commit 4ce8c52

Browse files
anandgupta42claude
andcommitted
fix: install from npm only, clear notice when check cmd unavailable
- Removed GitHub releases API version fetch entirely - Install via npm @latest only (GitHub releases are not npm) - Clear notice when check command isn't available (needs v0.5.10+) - v0.5.10 must be published to npm to enable AST-based analysis Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e4bed59 commit 4ce8c52

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

action.yml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,37 +93,26 @@ outputs:
9393
runs:
9494
using: "composite"
9595
steps:
96-
- name: Get altimate-code version
97-
id: version
98-
shell: bash
99-
run: |
100-
# Try with token first, fall back to unauthenticated
101-
VERSION=$(curl -sf -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/AltimateAI/altimate-code/releases/latest 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4)
102-
if [ -z "$VERSION" ]; then
103-
VERSION=$(curl -sf https://api.github.com/repos/AltimateAI/altimate-code/releases/latest 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4)
104-
fi
105-
if [ -z "$VERSION" ]; then
106-
echo "::warning::Could not determine altimate-code version — using v0.5.10 as fallback"
107-
VERSION="v0.5.10"
108-
fi
109-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
110-
echo "Resolved altimate-code version: ${VERSION}"
111-
11296
- name: Install altimate-code
11397
shell: bash
11498
run: |
115-
VERSION="${{ steps.version.outputs.version }}"
116-
echo "Installing altimate-code ${VERSION} via npm..."
117-
npm install -g "@altimateai/altimate-code@${VERSION#v}" 2>&1 || \
118-
npm install -g @altimateai/altimate-code@latest 2>&1 || \
119-
echo "::warning::Failed to install altimate-code — falling back to regex rules"
99+
echo "Installing altimate-code via npm..."
100+
npm install -g @altimateai/altimate-code@latest 2>&1
120101
121-
# Verify
102+
# Verify and check if `check` command is available
122103
if command -v altimate-code >/dev/null 2>&1; then
123-
echo "altimate-code $(altimate-code --version 2>/dev/null || echo 'installed')"
124-
altimate-code check --help >/dev/null 2>&1 && echo "check command: available" || echo "check command: not available"
104+
VERSION=$(altimate-code --version 2>/dev/null || echo "unknown")
105+
echo "altimate-code ${VERSION} installed"
106+
107+
# Test if check command exists (added in v0.5.10+)
108+
if altimate-code check --help >/dev/null 2>&1; then
109+
echo "check command: available"
110+
else
111+
echo "check command: not available in v${VERSION} — will use regex rules"
112+
echo "::notice::altimate-code check requires v0.5.10+. Current: v${VERSION}. Publish to npm to enable AST-based analysis."
113+
fi
125114
else
126-
echo "::warning::altimate-code not found on PATH after install"
115+
echo "::warning::altimate-code not found after npm install — regex rules only"
127116
fi
128117
129118
- name: Setup Node.js

0 commit comments

Comments
 (0)