This document explains how to create releases and manage versioning for UDDIN-LANG.
UDDIN-LANG uses Semantic Versioning (SemVer):
- MAJOR version (1.0.0) - Breaking changes
- MINOR version (0.1.0) - New features, backward compatible
- PATCH version (0.0.1) - Bug fixes, backward compatible
Before creating a release, ensure all changes are committed:
git status
git add .
git commit -m "Prepare for release v1.0.0"# Create annotated tag
git tag -a v1.0.0 -m "Release v1.0.0"
# Or use Makefile
make tag-release VERSION=v1.0.0git push origin v1.0.0
# Or push all tags
git push --tags# Build with version info
make release VERSION=v1.0.0./uddinlang --version
# Should output: Uddin-Lang v1.0.0 (built: ...) (commit: ...) (go: ...)Users can install UDDIN-LANG as a Go library using:
go get github.com/bonkzero404/uddin-lang@latestgo get github.com/bonkzero404/uddin-lang@v1.0.0go get github.com/bonkzero404/uddin-lang@mainAfter installation, import the package:
import (
"github.com/bonkzero404/uddin-lang/interpreter"
uddin "github.com/bonkzero404/uddin-lang"
)
func main() {
// Use the engine API
engine := uddin.New()
result, err := engine.ExecuteString(`
fun main():
print("Hello from UDDIN-LANG!")
end
`)
// Or use interpreter directly
program, err := interpreter.ParseProgram([]byte(code))
stats, err := interpreter.Execute(program, &interpreter.Config{})
}Version information is automatically injected during build via ldflags:
go build -ldflags "-X github.com/bonkzero404/uddin-lang/internal/version.Version=v1.0.0 \
-X github.com/bonkzero404/uddin-lang/internal/version.BuildTime=..." \
-o uddinlang ./cmd/uddin-langThe Makefile handles this automatically when using make build or make install.
# Check version from git
git describe --tags --always
# Check version in binary
./uddinlang --version
# Check version using Makefile
make versionFor automated releases, GitHub Actions can:
- Build binaries with version info
- Create git tags
- Publish to GitHub Releases
- Update version in go.mod (if needed)
- Always tag releases: Use annotated tags with meaningful messages
- Follow SemVer: Increment version appropriately for changes
- Test before tagging: Ensure all tests pass before creating a tag
- Update CHANGELOG: Document changes in CHANGELOG.md or RELEASE_NOTES.md
- Sign tags (optional): Use
git tag -sfor signed tags
If version shows "dev", it means:
- No git tag exists
- Binary was built without version flags
- Build process didn't inject version info
Solution: Use make build or make install instead of direct go build.
If go get fails:
- Ensure the tag exists on GitHub
- Check that go.mod is properly configured
- Verify module path is correct
If installed version doesn't match tag:
- Clear module cache:
go clean -modcache - Reinstall:
go get -u github.com/bonkzero404/uddin-lang@v1.0.0