feat: add "Last Update" badge showing daily activity
Add visible "Last Update" badge in README to showcase guide's high
activity (95+ releases in 33 days). Auto-updates via sync-version.sh.
Changes:
- README.md: Badge "Updated-{date}_·_v{version}" before Quiz badge
- README.md: Footer now shows "Updated daily · {date}"
- sync-version.sh: Auto-update date in badge + footer on version sync
Badge links to CHANGELOG.md for full history.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7b0d65cb09
commit
b5eea8d30c
2 changed files with 40 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<p align="center">
|
||||
<a href="https://github.com/FlorianBruniaux/claude-code-ultimate-guide/stargazers"><img src="https://img.shields.io/github/stars/FlorianBruniaux/claude-code-ultimate-guide?style=for-the-badge" alt="Stars"/></a>
|
||||
<a href="./CHANGELOG.md"><img src="https://img.shields.io/badge/Updated-Feb_10,_2026_·_v3.24.0-brightgreen?style=for-the-badge" alt="Last Update"/></a>
|
||||
<a href="./quiz/"><img src="https://img.shields.io/badge/Quiz-257_questions-orange?style=for-the-badge" alt="Quiz"/></a>
|
||||
<a href="./examples/"><img src="https://img.shields.io/badge/Templates-111-green?style=for-the-badge" alt="Templates"/></a>
|
||||
</p>
|
||||
|
|
@ -509,7 +510,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|||
|
||||
---
|
||||
|
||||
*Version 3.24.0 | February 2026 | Crafted with Claude*
|
||||
*Version 3.24.0 | Updated daily · Feb 10, 2026 | Crafted with Claude*
|
||||
|
||||
<!-- SEO Keywords -->
|
||||
<!-- claude code, claude code tutorial, anthropic cli, ai coding assistant, claude code mcp,
|
||||
|
|
|
|||
|
|
@ -66,12 +66,50 @@ check_file() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Function to update date in README
|
||||
update_readme_date() {
|
||||
local file="README.md"
|
||||
|
||||
if [[ ! -f "$file" ]]; then
|
||||
echo "⚠️ $file not found"
|
||||
return
|
||||
fi
|
||||
|
||||
# Get current date in format: Feb 10, 2026
|
||||
local current_date=$(date +"%b %-d, %Y")
|
||||
# Format for badge: Feb_10,_2026
|
||||
local badge_date=$(echo "$current_date" | sed 's/ /_/g')
|
||||
|
||||
if $CHECK_ONLY; then
|
||||
# In check mode, verify if dates need updating
|
||||
if ! grep -q "Updated-${badge_date}_·_v${VERSION}-brightgreen" "$file" 2>/dev/null; then
|
||||
echo "📍 $file: date badge needs update (→ $current_date)"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
if ! grep -q "Updated daily · ${current_date}" "$file" 2>/dev/null; then
|
||||
echo "📍 $file: footer date needs update (→ $current_date)"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
else
|
||||
# Update badge date pattern: Updated-XXX-brightgreen
|
||||
sed -i '' "s|Updated-[^-]*-brightgreen|Updated-${badge_date}_·_v${VERSION}-brightgreen|g" "$file"
|
||||
|
||||
# Update footer date pattern: Updated daily · DATE (preserve space before |)
|
||||
sed -i '' "s|Updated daily · [^|]*|Updated daily · ${current_date} |g" "$file"
|
||||
|
||||
echo "✅ $file: date updated (→ $current_date)"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check main files
|
||||
check_file "README.md"
|
||||
check_file "guide/cheatsheet.md"
|
||||
check_file "guide/ultimate-guide.md"
|
||||
check_file "machine-readable/reference.yaml"
|
||||
|
||||
# Update README date (version and date in badge + footer)
|
||||
update_readme_date
|
||||
|
||||
echo ""
|
||||
|
||||
if $CHECK_ONLY && [[ $ERRORS -gt 0 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue