Update Codescope
Check for the latest version and update if available.
Steps:
- Get the current installed version:
```bash
codescope --version 2>/dev/null || codescope-mcp --version 2>/dev/null || echo "unknown"
```
- Check the latest release from GitHub:
```bash
curl -fsSL https://api.github.com/repos/onur-gokyildiz-bhi/codescope/releases/latest 2>/dev/null | grep -o '"tag_name": "[^"]"' | head -1 | sed 's/."v\?\([^"]\)"/\1/'
```
- Compare versions. If they match, report "Already up to date" and stop.
- If an update is available, ask the user for confirmation, then run the appropriate installer:
Windows (PowerShell):
```powershell
powershell -Command "irm https://raw.githubusercontent.com/onur-gokyildiz-bhi/codescope/main/install.ps1 | iex"
```
Linux / macOS:
```bash
curl -fsSL https://raw.githubusercontent.com/onur-gokyildiz-bhi/codescope/main/install.sh | bash
```
- Verify the update:
```bash
codescope --version
```
- Report the result:
```
Codescope updated: v0.4.0 -> v0.5.0
```