feat: add automatic update check on session start
- Added check-updates script to package.json - SessionStart hook fetches latest version from GitHub - Compares local and remote versions - Shows update notification when newer version available - Works even after disconnecting from original repo - Also improved release command documentation with clearer semver guidance
This commit is contained in:
@@ -56,17 +56,51 @@ Automates the entire release process: analyzes recent commits to determine versi
|
|||||||
### Semantic Versioning (MAJOR.MINOR.PATCH)
|
### Semantic Versioning (MAJOR.MINOR.PATCH)
|
||||||
|
|
||||||
**MAJOR** (1.0.0 → 2.0.0):
|
**MAJOR** (1.0.0 → 2.0.0):
|
||||||
- Breaking changes
|
- Breaking changes that require users to change their code/config
|
||||||
|
- Removing features or commands
|
||||||
|
- Changing command syntax or behavior incompatibly
|
||||||
- Commits with "BREAKING CHANGE" in body
|
- Commits with "BREAKING CHANGE" in body
|
||||||
- Commits with "!" after type (e.g., "feat!:")
|
- Commits with "!" after type (e.g., "feat!:")
|
||||||
|
|
||||||
**MINOR** (1.0.0 → 1.1.0):
|
**MINOR** (1.0.0 → 1.1.0):
|
||||||
- New features (backward compatible)
|
- **NEW capabilities** added (not enhancements to existing features)
|
||||||
- Commits starting with "feat:"
|
- New commands, new tools, new integrations
|
||||||
|
- New optional features that don't affect existing functionality
|
||||||
|
- Commits starting with "feat:" that add NEW functionality
|
||||||
|
- Examples:
|
||||||
|
- Adding a new `/command`
|
||||||
|
- Adding a new MCP server
|
||||||
|
- Adding vault import capability (first time)
|
||||||
|
|
||||||
**PATCH** (1.0.0 → 1.0.1):
|
**PATCH** (1.0.0 → 1.0.1):
|
||||||
- Bug fixes and minor changes
|
- Bug fixes and minor improvements
|
||||||
- Commits with "fix:", "docs:", "style:", "refactor:", "test:", "chore:"
|
- Enhancements to existing features
|
||||||
|
- Performance improvements
|
||||||
|
- Documentation updates
|
||||||
|
- Refactoring without changing behavior
|
||||||
|
- Commits with "fix:", "docs:", "style:", "refactor:", "perf:", "test:", "chore:"
|
||||||
|
- Examples:
|
||||||
|
- Making an existing command smarter
|
||||||
|
- Improving error messages
|
||||||
|
- Fixing bugs in existing features
|
||||||
|
- Enhancing existing import to be more intelligent
|
||||||
|
|
||||||
|
### Commit Message Best Practices
|
||||||
|
|
||||||
|
**Use "feat:" only for NEW features:**
|
||||||
|
- ✅ `feat: add vault import capability`
|
||||||
|
- ❌ `feat: enhance vault import` (should be `fix:` or `refactor:`)
|
||||||
|
|
||||||
|
**Use "fix:" for improvements and corrections:**
|
||||||
|
- ✅ `fix: improve vault detection accuracy`
|
||||||
|
- ✅ `fix: correct file counting in init-bootstrap`
|
||||||
|
|
||||||
|
**Use "refactor:" for code improvements:**
|
||||||
|
- ✅ `refactor: enhance profile building with URL fetching`
|
||||||
|
- ✅ `refactor: make init-bootstrap questions smarter`
|
||||||
|
|
||||||
|
**Use "perf:" for performance improvements:**
|
||||||
|
- ✅ `perf: optimize vault analysis for large vaults`
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
{
|
{
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "[ -f FIRST_RUN ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# 🚀 Welcome to Claudesidian!\\n\\n**This appears to be your first time using this vault.**\\n\\n## Quick Start\\n\\nRun the setup wizard:\\n\\n```\\n/init-bootstrap\\n```\\n\\n## What this will do:\\n\\n✅ Set up your personalized configuration\\n✅ Disconnect from the original repository \\n✅ Help you import any existing Obsidian vault\\n✅ Configure your preferred workflow\\n✅ Create your PARA folder structure\\n\\nThe setup wizard will guide you through everything!\"}}' || true"
|
"command": "[ -f FIRST_RUN ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# 🚀 Welcome to Claudesidian!\\n\\n**This appears to be your first time using this vault.**\\n\\n## Quick Start\\n\\nRun the setup wizard:\\n\\n```\\n/init-bootstrap\\n```\\n\\n## What this will do:\\n\\n✅ Set up your personalized configuration\\n✅ Disconnect from the original repository \\n✅ Help you import any existing Obsidian vault\\n✅ Configure your preferred workflow\\n✅ Create your PARA folder structure\\n\\nThe setup wizard will guide you through everything!\"}}' || true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "npm run check-updates 2>/dev/null || true"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -15,7 +15,8 @@
|
|||||||
"attachments:orphans": "for file in 05_Attachments/*; do basename \"$file\" | xargs -I {} sh -c 'grep -r \"{}\" . --include=\"*.md\" > /dev/null || echo \"{}\"'; done",
|
"attachments:orphans": "for file in 05_Attachments/*; do basename \"$file\" | xargs -I {} sh -c 'grep -r \"{}\" . --include=\"*.md\" > /dev/null || echo \"{}\"'; done",
|
||||||
"attachments:recent": "find 05_Attachments -type f -mtime -7 -exec ls -la {} \\;",
|
"attachments:recent": "find 05_Attachments -type f -mtime -7 -exec ls -la {} \\;",
|
||||||
"attachments:create-organized": "mkdir -p 05_Attachments/Organized",
|
"attachments:create-organized": "mkdir -p 05_Attachments/Organized",
|
||||||
"vault:stats": ".scripts/vault-stats.sh"
|
"vault:stats": ".scripts/vault-stats.sh",
|
||||||
|
"check-updates": "REMOTE=$(curl -s https://raw.githubusercontent.com/heyitsnoah/claudesidian/main/package.json | grep version | head -1 | sed 's/.*: \"\\(.*\\)\".*/\\1/') && LOCAL=$(grep version package.json | head -1 | sed 's/.*: \"\\(.*\\)\".*/\\1/') && if [ \"$LOCAL\" != \"$REMOTE\" ]; then echo \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"📦 Update available! Latest: $REMOTE (you have: $LOCAL)\\\\nRun /upgrade to update.\\\"}}\"; fi"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"obsidian",
|
"obsidian",
|
||||||
|
|||||||
Reference in New Issue
Block a user