automaton-build.os.version

Version of the current codebase

  • Version is based on a root project file named version.edn. Strengths:
  • One source of truth for version.
  • Change of version in a PR is more straightforward to notice
  • Flexibility (We don’t decide on versioning strategy, we just have file that is point of reference to what version you are on.) Constraints:
  • Keeping up with updates for version files (although with automated tooling we have, it is not that big of a deal currently)

Previous design: * major version has to be changed in the major-version in build_config.edn (many sources of truth and build_config shouldn’t be a place that is used as variable that change often) * counting commits from a branch to base a minor version on it (Many edgecases where commits don’t match the version, initial commits, PRs having more than one commit…)

add-optional-qualifier

(add-optional-qualifier version qualifier)

ask-manual-version

(ask-manual-version)

Asks user to input version manually

ask-version

(ask-version project-name current-version changes)(ask-version project-name current-version)

Asks user what should be a new version following the non-breaking version system

current-version

(current-version app-dir)

generate-new-version

(generate-new-version current-version app-name changes)

save-version

(save-version app-dir new-version)

Update app version file version.edn in app-dir. Captures requirement for the version to be consciously decided when saved Params: * app-dir directory of the version to count * new-version

split-optional-qualifier

(split-optional-qualifier version)

Removes optional qualifier. (Semantic versioning: ..-optional-qualifier) So e.g. 0.0.20-SNAPSHOT -> 0.0.20

version-file

(version-file)(version-file dir)