build-time semantic versioning #21

Manually merged
x1ddos merged 2 commits from semver into master 1 year ago

2 Commits (master)

Author SHA1 Message Date
alex 517f9d4056
ui: display ngui semver on a new info panel tab
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
this adds the 4th tab, an info-icon button, and shows the value of
the release version recorded at build time - a feature added in a
previous commit.
1 year ago
alex 7dc1f6329e
build: add semantic versioning support
both nd and ngui now acquire semantic versioning recorded at the build
time. they also report the version at startup and -v flag.
this is useful for a release process and to avoid potential
compatibility issues in the future.

in a regular build flow, the version is taken from a git tag using the
following command:

    git -C . describe --match 'v*.*.*' --tags --abbrev=8

in a non-standard scenario where git isn't available, the version can
be provided on the command line during build like so:

    zig build -Dversion=1.2.3

if both git and command line supplied versions are available, they must
match.
1 year ago