This guide explains how to upgrade Devkit between versions.
Devkit follows Semantic Versioning:
- PATCH (3.1.X): No breaking changes - safe to upgrade
- MINOR (3.X.0): New features - backward compatible
- MAJOR (X.0.0): Breaking changes - may require manual steps
# Update Devkit
cd devkit
git fetch origin
git pull origin main
# Re-run setup
./bootstrap.sh
# Verify
./verify-setup.shWhat Changed:
- Configuration security hardening
- Plugin system validation
- Bootstrap checksum verification
- Enhanced documentation
Migration:
# No manual migration needed - automatic on first run
./bootstrap.sh
# Existing configs automatically secured
# Permissions fixed to 0600 if neededBackward Compatibility: ✅ Full (auto-migrations on first run)
What Changed:
- Config directory:
~/.devkit→~/.devkit - Python requirement: 3.9+
- Ansible requirement: 2.15+
- Main branch renamed: MASTER → main
Migration Steps:
# 1. Backup your setup
cp -r ~/.devkit ~/.devkit.v2.backup
# 2. Update to main branch
git remote set-url origin https://github.com/vietcgi/devkit.git
git checkout main
git pull origin main
# 3. Run new bootstrap
./bootstrap.sh
# 4. Reconfigure custom settings
# Edit ~/.devkit/config.yaml with your preferences
# 5. Copy custom plugins (if any)
cp ~/.devkit.v2.backup/plugins/* ~/.devkit/plugins/ 2>/dev/null || true
# 6. Verify installation
./verify-setup.shKnown Issues:
- Old casks may not auto-install (re-run Brewfile)
- Custom roles need path updates
- Some environment variables may need reconfiguring
If something goes wrong after upgrade:
# Restore from backup
rm -rf ~/.devkit
cp -r ~/.devkit.backup ~/.devkit
# Revert code to previous version
git checkout v3.0.0 # or desired version
./bootstrap.sh
# Verify restored
./verify-setup.sh# Show current version
cat VERSION
# See recent releases
git log --oneline | grep -i release | head -5
# List all versions
git tag | grep "^v" | sort -VBefore upgrading, see what's new:
# View changelog
cat CHANGELOG.md | head -50
# See specific version changes
git show v3.1.0:CHANGELOG.md
# See commits since your version
git log v3.0.0..v3.1.0 --onelineFor major version upgrades, test first:
# Create test VM/container
multipass launch ubuntu:22.04 --name test-devkit
# Transfer Devkit to test machine
multipass transfer devkit test-devkit:/home/ubuntu/
# Test the upgrade
multipass exec test-devkit -- bash ~/devkit/bootstrap.sh
# Verify it works
multipass exec test-devkit -- bash ~/devkit/verify-setup.sh
# If good, upgrade on real machine
# If bad, debug before real upgrade- Reinstall git:
brew install git - Update PATH: Check shell config
- Make scripts executable:
chmod +x bootstrap.sh - Or use bash explicitly:
bash bootstrap.sh
- Check version:
python3 --version - Upgrade if needed:
brew install python@3.12
- Manually merge configs:
diff ~/.devkit/config.yaml ~/.devkit/config.yaml - Or start fresh:
rm ~/.devkit/config.yamlthen re-run
- Reinstall:
brew install ansible - Update mise:
mise upgrade - Check pre-requisites:
./verify-setup.sh
- See SUPPORT.md for support options
- Check FAQ below
- Report issues: https://github.com/vietcgi/devkit/issues
Q: Is it safe to upgrade? A: Yes, PATCH and MINOR upgrades are safe. MAJOR upgrades may require manual steps.
Q: Will I lose my configuration? A: No, your config is preserved. Backups are created automatically.
Q: Can I downgrade? A: Yes, see Rollback Procedure section.
Q: How often should I upgrade? A: Upgrade at least monthly for security patches. Use your judgment for major versions.
Q: What if upgrade fails? A: Use Rollback Procedure to restore previous version, then investigate.
Q: Do I need to update manually? A: Yes, automatic updates are not enabled. Manual upgrade gives you control.
For more help, see SUPPORT.md or open an issue on GitHub.