7 releases
new 0.2.1 | Jan 12, 2025 |
---|---|
0.2.0 | Jan 12, 2025 |
0.1.4 | May 3, 2024 |
0.1.3 | Mar 25, 2023 |
0.1.1 | May 29, 2022 |
#238 in Command-line interface
137 downloads per month
Used in 5 crates
(4 directly)
5KB
buildinfy
Want easy access to CI variables such as revision, pipeline number, CI job name, target platform, and Sentry DSN? This crate provide just that for GitLab, Gitea, and GitHub.
// returns branch name: `main`, `stable`...
fn build_reference() -> Option<&'static str>;
// returns CI run number: e.g. `123`.
build_pipeline_id_per_project() -> Option<&'static str>;
// returns CI job name: e.g. `package-debian-amd64`.
fn build_job_name() -> Option<&'static str>;
// returns owner and repository name: e.g. bitpowder/indigo-ng.
fn build_project() -> Option<&'static str>;
// returns the `SENTRY_DSN` variable, useful to configure crash reporting in certain builds.
fn build_sentry_dsn() -> Option<&'static str>;
// returns platform: linux, freebsd, win, mac, unix, other (useful for auto updating URLs)
fn build_target() -> &'static str;