Commit Graph

4 Commits (a7c560e92ab7e75e9eeada5adf11cd4b1322a9af)

Author SHA1 Message Date
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
alex 5c60b92f85
ci: run lint, tests and build for each commit
ci/woodpecker/push/woodpecker Pipeline was successful Details
the CI uses a custom image produced by tools/ci-containerfile.
see instructions in the readme.

CI logs are at https://woodpecker.qcode.ch/nakamochi/ndg
2 years ago
alex ae7c3b2db8
tools: be silent when checking c code formatting
no news is good news. and either way, clang-format verbose mode is
inconsistent with zig fmt. the latter outputs only malformatted files.
2 years ago
alex 698e5b6f76
src,lib: zig fmt and clang-format all code
C style is now fixed by .clang-format.
a handy script to check all source code formatting is in
tools/fmt-check.sh.
2 years ago