Deployment
How to deploy and release new versions of Divekit.
[!WARNING]
Not implemented this way yet - the current process is shown in the gif below.
This guide covers the process of deploying and releasing new versions of Divekit.
Version Management
Semantic Versioning
Divekit follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for new functionality
- PATCH version for bug fixes
Version Tagging
# Current version is v2.0.0
# Bump patch version (e.g., v2.0.0 -> v2.0.1)
./deploy.sh patch
# Bump minor version (e.g., v2.0.0 -> v2.1.0)
./deploy.sh minor
# Bump major version (e.g., v2.0.0 -> v3.0.0)
./deploy.sh major
# Create alpha/beta versions
./deploy.sh minor -alpha.1 # Creates v2.1.0-alpha.1
./deploy.sh patch -beta.2 # Creates v2.0.1-beta.2
# Rollback options
./deploy.sh rollback # Removes current tag and returns to previous version
./deploy.sh rollback v2.1.0 # Removes specific version tag
Example (current state)
Release Process
- Update version using deploy.sh:
./deploy.sh <patch|minor|major> [-alpha.N|-beta.N]
- Update CHANGELOG.md:
## [2.0.1] - YYYY-MM-DD
### Added
- New feature X
- Command Y support
### Changed
- Improved Z performance
### Fixed
- Bug in command A
- Create release branch:
git checkout -b release/v2.0.1
- Build and test locally:
go test ./...
go build
- Create GitLab release:
- Tag version is created automatically
- Changelog from CHANGELOG.md is included automatically
- CI pipeline automatically:
- Runs all tests
- Builds binaries for all supported platforms
- Creates release artifacts
- Uploads binaries to the release
Deployment Checklist
- All tests passing locally (
go test ./...
) - Documentation updated
- CHANGELOG.md updated
- Version tagged using
deploy.sh
- GitLab CI/CD Pipeline completed successfully:
- Binaries built successfully
- Release artifacts generated
- Release created and verified in GitLab
- Generated binaries tested on sample installation
Rollback Procedure
If issues are found:
- Execute rollback using deploy.sh:
./deploy.sh rollback [version] # Version is optional
This automatically executes the following steps:
- Deletes the specified tag (or current tag if no version specified) locally and remote
- Reverts to the previous version
- Creates a new hotfix branch if desired
Examples:
./deploy.sh rollback # Removes the most recent tag
./deploy.sh rollback v2.1.0 # Removes specific version v2.1.0
./deploy.sh rollback v2.0.0-alpha.1 # Removes a specific alpha version
If manual rollback is necessary:
git tag -d v2.0.1
git push origin :refs/tags/v2.0.1
git checkout -b hotfix/2.0.2
Last modified January 23, 2025: create files for notes, ideas, questsions (d0ee9e3)