Development

Versioning

Versions are specified using git tags, based on semantic versioning, and use the format MAJOR.MINOR.PATCH. While the MAJOR version is 0, MINOR version bumps are considered MAJOR bumps per the semver spec.

Changelogs

Changelogs follow the keep a changelog convention and are maintained in the canonical source. The changelog for each version is published verbatim on GitHub Releases and on the blog#release.

Build from source

# Linux or macOS (with coreutils)
# Depends: git, golang, tailwindcss-cli (v3.1.6)
git clone https://github.com/alonswartz/notesium.git
cd notesium
./web/app/make.sh all
go build -ldflags "
    -X main.gitversion=$(git describe --tags --long --always --dirty) \
    -X main.buildtime=$(date -u +%Y-%m-%dT%H:%M:%SZ)"

Regression tests

Test suites for all commands and their options (except for --color) are included in the tests/ directory, along with fixtures acting as a notes corpus. The tests are dependent on bats-core.

Some tests are dependent on the modification datetime of the notes (sorting and prefixing), in which case the test suite will duplicate the corpus to a temporary directory and modify the mtime deterministically.

These test suites can be paused prior to teardown for manual inspection and additional testing by setting the PAUSE environmental variable.

# run all test suites
bats tests

# run a specific test suite
bats tests/list.bats

# run a subset of tests within a specific test suite
bats tests/list.bats --filter "mtime"

# run a specific test suite, but pause prior to teardown (--tap recommended)
PAUSE=y bats tests/list.bats --tap