#toml #echo #packaging #file #separators

app toml-echo

Tool for printing toml variables

3 releases (breaking)

0.3.0 Apr 14, 2021
0.2.0 Apr 14, 2021
0.1.0 Dec 16, 2019

#1138 in Development tools

MIT/Apache

4KB
65 lines

toml-echo

This is a very simple tool for printing single values out of toml files.

It can be used when packaging rust applications to get the version from the manifest file.

If a tomfile doesn't contain any path segment separators (e.g. "Cargo.toml"), then the file will be searched after upwards from the current working dir. Otherwise, if the tomlfile argument has separators (e.g. "./Cargo.toml") it will only be searched for in the current working directory.

Example usage

#!/usr/bin/env bash

VERSION=$(toml-echo Cargo.toml package.version)

Dependencies

~2–2.8MB
~53K SLoC