This is a simple library for JPM project housekeeping jobs. It's mainly to be used by our other projects as a build-time dependency.
(vcs/get-vcs-version)Retrieves the version string from the version control system managing the current working directory,
by invoking appropriate commands. Supports Fossil and Git. Would return nil in an unmanaged
directory.
(vcs/format-vcs-version-string vcs-version abbr-hash-len)Converts the VCS version to a more readable string. vcs-version should be the value returned by
vcs/get-vcs-version. abbr-hash-len specifies how many characters, from the version string, to
keep.
(util/dir-exists? name)Checks if the specified directory exists.
(util/ensure-dir name)Checks if the specified directory exists, otherwise creates it.
(util/spawn-and-wait & args)Runs a command, waits for it to complete, and returns the content of its stdout. Would raise an error if the command's exit code was not zero.
All code in this repo is MIT-licensed.