1.6 KiB
1.6 KiB
Release Process
MyTube follows Semantic Versioning 2.0.0.
Versioning Scheme
Versions are formatted as MAJOR.MINOR.PATCH (e.g., 1.0.0).
- MAJOR: Incompatible API changes.
- MINOR: Backwards-compatible functionality.
- PATCH: Backwards-compatible bug fixes.
Creating a Release
We use the release.sh script to automate the release process. This script handles:
- Updating version numbers in
package.jsonfiles. - Creating a git tag.
- Building and pushing Docker images.
Prerequisites
- Ensure you are on the
mainbranch. - Ensure your working directory is clean (no uncommitted changes).
- Ensure you are logged in to Docker Hub (
docker login).
Usage
Run the release script with the desired version number:
./release.sh <version>
Example:
./release.sh 1.2.0
Alternatively, you can specify the increment type:
./release.sh patch # 1.1.0 -> 1.1.1
./release.sh minor # 1.1.0 -> 1.2.0
./release.sh major # 1.1.0 -> 2.0.0
What the Script Does
- Checks that you are on
mainand have a clean git status. - Updates
versionin:package.jsonfrontend/package.jsonbackend/package.json
- Commits the changes with message
chore(release): v<version>. - Tags the commit with
v<version>. - Builds Docker images for backend and frontend.
- Pushes images to Docker Hub with tags:
franklioxygen/mytube:backend-<version>franklioxygen/mytube:backend-latestfranklioxygen/mytube:frontend-<version>franklioxygen/mytube:frontend-latest