Crates.io | toml-echo |
lib.rs | toml-echo |
version | 0.4.0 |
source | src |
created_at | 2019-12-16 11:52:10.310612 |
updated_at | 2023-08-01 13:15:38.604397 |
description | Tool for printing toml variables |
homepage | https://github.com/nickez/toml-echo |
repository | https://github.com/nickez/toml-echo |
max_upload_size | |
id | 189741 |
size | 12,674 |
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.
#!/usr/bin/env bash
VERSION=$(toml-echo Cargo.toml package.version)