Skip to content

Commit 9158004

Browse files
author
Eric Buess
committed
Merge branch 'dev'
2 parents 1c6da19 + 5d9a158 commit 9158004

3 files changed

Lines changed: 89 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'scripts/claude-docs-helper.sh.template'
9+
workflow_dispatch: # Allow manual trigger
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # Get all history for changelog
23+
24+
- name: Extract version from helper script
25+
id: version
26+
run: |
27+
VERSION=$(grep "^SCRIPT_VERSION=" scripts/claude-docs-helper.sh.template | cut -d'"' -f2)
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
30+
echo "Extracted version: $VERSION"
31+
32+
- name: Check if release exists
33+
id: check_release
34+
run: |
35+
if gh release view "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
36+
echo "exists=true" >> $GITHUB_OUTPUT
37+
echo "Release ${{ steps.version.outputs.tag }} already exists"
38+
else
39+
echo "exists=false" >> $GITHUB_OUTPUT
40+
echo "Release ${{ steps.version.outputs.tag }} does not exist"
41+
fi
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Create release
46+
if: steps.check_release.outputs.exists == 'false'
47+
run: |
48+
gh release create "${{ steps.version.outputs.tag }}" \
49+
--title "Claude Code Docs ${{ steps.version.outputs.tag }}" \
50+
--generate-notes \
51+
--notes "
52+
## Claude Code Documentation Mirror ${{ steps.version.outputs.tag }}
53+
54+
This release includes the latest updates to the Claude Code documentation mirror.
55+
56+
### Installation
57+
58+
\`\`\`bash
59+
curl -fsSL https://raw.githubusercontent.com/ericbuess/claude-code-docs/main/install.sh | bash
60+
\`\`\`
61+
62+
### What's Changed (Auto-generated)
63+
"
64+
env:
65+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Release already exists
68+
if: steps.check_release.outputs.exists == 'true'
69+
run: |
70+
echo "ℹ️ Release ${{ steps.version.outputs.tag }} already exists, skipping creation"

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,21 @@ The changelog feature fetches the latest release notes directly from the officia
9797
/docs uninstall # Get commnd to remove claude-code-docs completely
9898
```
9999

100+
### Customize command name
101+
102+
If you prefer a different command name (e.g., `/claude-docs` instead of `/docs`), you can easily customize it:
103+
104+
```bash
105+
# Rename the command file
106+
mv ~/.claude/commands/docs.md ~/.claude/commands/claude-docs.md
107+
108+
# Now use /claude-docs instead of /docs
109+
/claude-docs hooks
110+
/claude-docs mcp
111+
```
112+
113+
You can use any name you prefer: `/cdocs`, `/claude-code-docs`, etc. The command file name determines the slash command.
114+
100115
### Creative usage examples
101116
```bash
102117
# Natural language queries work great

scripts/claude-docs-helper.sh.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ auto_update() {
6060

6161
# Check if installer needs updating
6262
local INSTALLER_VERSION=$SCRIPT_VERSION
63-
local VERSION_INT=$(echo "$INSTALLER_VERSION" | sed 's/^0\.//')
64-
63+
local VERSION_INT=$(echo "$INSTALLER_VERSION" | sed 's/^0\.//' | cut -d. -f1)
64+
6565
if [[ $VERSION_INT -ge 3 ]]; then
6666
echo "🔧 Updating Claude Code Docs installer..." >&2
6767
./install.sh >/dev/null 2>&1
@@ -162,8 +162,8 @@ read_doc() {
162162

163163
# Check if installer needs updating
164164
local INSTALLER_VERSION=$SCRIPT_VERSION
165-
local VERSION_INT=$(echo "$INSTALLER_VERSION" | sed 's/^0\.//')
166-
165+
local VERSION_INT=$(echo "$INSTALLER_VERSION" | sed 's/^0\.//' | cut -d. -f1)
166+
167167
if [[ $VERSION_INT -ge 3 ]]; then
168168
./install.sh >/dev/null 2>&1
169169
fi

0 commit comments

Comments
 (0)