Skip to content

Schema for verMan version managers

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

verman-io/verman-schema-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verman-schema-rs

License

Schema for verMan version managers. Currently, this includes JSON & TOML examples and serde Rust structs.

For more information see https://verMan.io

Predefined constants

These constants are accessible in the TOML/YAML/JSON file using ${} syntax, like ${OS} == \"windows\" in a when field.

Resolving configuration

Configuration resolution should be straightforward. To remove ambiguity, this is documented below.

  1. System environment variables added to internal dictionary vars
  2. constants upserted to internal dictionary vars
  3. env_vars JSON-objects upserted to internal dictionary vars
  4. Strings ${NAME} evaluated using aforementioned vars and predefined constants; when NAME not found ${NAME} is left as ${NAME}
  5. Strings with shebang evaluation a) implicitly takes config file-contents as stdin b) aforementioned vars are made available to shebang-evaluated c) #!/jq isn't real jq but the #RewriteInRust jaq compiled into this library d) Similarly, the normal shebang isn't real. This library handles execution; by reading the first line; making this far more portable (e.g., to Windows [both CMD and PowerShell]).
  6. Similar to $ref of JSON-reference (common in JSON-schema) cross-referencing can occur and thus multiple passes may be required to fully-resolve variables

Building

Release (shared library)

$ cargo rustc --crate-type cdylib --release

On my x86_64 Linux box this produces:

3.7M ./target/release/deps/libserde_derive-b66a5407fc23d48c.so
16K  ./target/release/deps/libverman_schema_rs.so
16K  ./target/release/libverman_schema_rs.so

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Schema for verMan version managers

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages