setversion

command
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command setversion keeps the "version" field of mygo.json in sync with the git tag a release is built from.

go run ./scripts/setversion             # use the latest v* tag
go run ./scripts/setversion v1.2.0      # use an explicit tag (v is optional)
go run ./scripts/setversion --print     # print the configured version

`go tool mygo build` has no flag for the version: it always reads `version` from mygo.json, so a tag that reaches the release workflow would otherwise ship whichever version happened to be committed. The workflow runs this with $GITHUB_REF_NAME before building, so v1.2.0 always produces 1.2.0 bundles. Only the version line is rewritten, which keeps release diffs reviewable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL