This guide explains how to manage versions and releases for OpenMorph using the integrated version management system.
OpenMorph uses a .version file to track the current version, along with automated scripts for version bumping and release management.
The .version file contains the current semantic version (e.g., 1.2.3) without the v prefix.
# Show current version
./scripts/version.sh show
# Bump patch version (1.0.0 -> 1.0.1)
./scripts/version.sh bump patch
# Bump minor version (1.0.0 -> 1.1.0)
./scripts/version.sh bump minor
# Bump major version (1.0.0 -> 2.0.0)
./scripts/version.sh bump major
# Set specific version
./scripts/version.sh set 2.1.0
# Create and push git tag for current version
./scripts/version.sh tag
# Full release: bump patch, commit, tag, and push
./scripts/version.sh release# Show current version
make version-show
# Bump versions
make version-bump-patch
make version-bump-minor
make version-bump-major
# Set specific version (interactive)
make version-set
# Create tag
make version-tag
# Full release
make version-releaseThe version is automatically integrated into builds:
- When building locally, the version from
.versionfile is used - Build command:
make buildorgo build -ldflags "-X github.com/developerkunal/OpenMorph/cmd.version=v$(VERSION)"
- When releasing via tags, GoReleaser sets the version from the git tag
- The ldflags inject the version into the binary at build time
- Build-time version: If set via ldflags (e.g., by GoReleaser), this takes precedence
- File version: If no build-time version, reads from
.versionfile - Development fallback: If neither available, defaults to "dev"
# 1. Bump version
./scripts/version.sh bump patch
# 2. Commit changes
git add .version
git commit -m "Bump version to $(cat .version)"
# 3. Push changes
git push
# 4. Create and push tag
./scripts/version.sh tag# This does everything in one command:
# - Bumps patch version
# - Commits the change
# - Pushes to remote
# - Creates and pushes tag
./scripts/version.sh release
# Or using make:
make version-release# Set specific version
./scripts/version.sh set 2.0.0
# Then do automated release
./scripts/version.sh releaseWhen a new tag is pushed, GitHub Actions automatically:
- Builds binaries for multiple platforms using GoReleaser
- Updates Homebrew tap at
developerkunal/homebrew-openmorph - Updates Scoop bucket at
developerkunal/scoop-openmorph - Creates GitHub release with release notes
After a successful release, users can install using:
brew tap developerkunal/openmorph
brew install openmorphscoop bucket add openmorph https://github.com/developerkunal/scoop-openmorph
scoop install openmorphUsers can check the installed version:
openmorph --version
# Output: openmorph version v1.2.3- The version script includes safety checks (clean working directory, branch validation)
- All version operations are logged with colored output for clarity
- The
.versionfile should always contain a valid semantic version - Tags are always prefixed with
v(e.g.,v1.2.3) even though the file contains just1.2.3
- Ensure
.versionfile exists and contains valid semver - Check that ldflags in Makefile/GoReleaser are correct
- Verify the import path in ldflags matches your module
- Check GitHub Actions logs
- Ensure GITHUB_TOKEN has proper permissions
- Verify repository names in
.goreleaser.ymlexist
- Check that the tap/bucket repositories exist
- Verify GitHub Actions completed successfully
- Ensure the repositories have proper write permissions