This commit fixes version management and argument parsing issues across both Windows and Linux/macOS platforms, achieving 100% test coverage. Changes: - Add VERSION file installation to both installers (install.sh, install.ps1) - Fix version/help command detection when using 'powershell -File' syntax - Rename PowerShell param from $Profile to $ProfileOrFlag for clarity - Add $FirstArg detection to check both ProfileOrFlag and RemainingArgs - Create comprehensive edge case test suites for both platforms: * tests/edge-cases.ps1 - 31 tests for Windows (100% pass) * tests/edge-cases.sh - 37 tests for Linux/macOS (100% pass) - Fix multiline regex matching in tests for error messages - Update test expectations to match platform-specific behavior - Reorganize project structure: * Move installers to installers/ directory * Add scripts/ directory for version management * Add config/ directory for configuration templates * Add docs/ directory for documentation Test Results: - Windows (PowerShell): 31/31 tests passing (100%) - Linux/macOS (Bash): 37/37 tests passing (100%) Breaking Changes: None - Installers moved but GitHub URLs updated in README files - All existing functionality preserved Co-authored-by: Claude Code <claude@anthropic.com>
2.6 KiB
Version Management
Overview
CCS uses a centralized version management system to ensure consistency across all components.
Version Locations
The version number must be kept in sync across these files:
VERSION- Primary version file (read by ccs/ccs.ps1 at runtime)installers/install.sh- Hardcoded for standalone installations (curl | bash)installers/install.ps1- Hardcoded for standalone installations (irm | iex)
Why Hardcoded Versions in Installers?
When users run:
curl -fsSL ccs.kaitran.ca/install | bashirm ccs.kaitran.ca/install.ps1 | iex
The installer script is downloaded and executed directly without the VERSION file. Therefore, installers must have a hardcoded version as fallback.
For git-based installations, the VERSION file is read if available, overriding the hardcoded version.
Updating Version
Automated Method (Recommended)
Use the provided script to bump the version automatically:
# Bump patch version (2.1.1 -> 2.1.2)
./scripts/bump-version.sh patch
# Bump minor version (2.1.1 -> 2.2.0)
./scripts/bump-version.sh minor
# Bump major version (2.1.1 -> 3.0.0)
./scripts/bump-version.sh major
This updates:
- VERSION file
- installers/install.sh (hardcoded version)
- installers/install.ps1 (hardcoded version)
- Creates git tag (if in git repo)
Manual Method
If updating manually, update version in ALL three locations:
-
VERSION file:
echo "2.1.2" > VERSION -
installers/install.sh (line ~34):
CCS_VERSION="2.1.2" -
installers/install.ps1 (line ~33):
$CcsVersion = "2.1.2"
Release Checklist
When releasing a new version:
- Update version using
./scripts/update-version.sh X.Y.Z - Review changes:
git diff - Update CHANGELOG.md with release notes
- Commit changes:
git commit -am "chore: bump version to X.Y.Z" - Create tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" - Push:
git push && git push --tags - Verify CloudFlare worker serves updated installer
Version Display
After installation, users can check version:
# Shows CCS version (from VERSION file if available)
ccs --version
# Shows Claude CLI version
ccs version
Semantic Versioning
CCS follows Semantic Versioning:
- MAJOR (X.0.0): Breaking changes
- MINOR (0.X.0): New features (backward compatible)
- PATCH (0.0.X): Bug fixes
Current version: 2.1.1
- 2.1.0: Added task delegation feature
- 2.1.1: Fixed argument parsing bug (flags treated as profiles)