| Crates.io | buildinfy |
| lib.rs | buildinfy |
| version | 0.2.1 |
| created_at | 2022-05-27 21:00:36.54175+00 |
| updated_at | 2025-01-12 08:53:25.4749+00 |
| description | Easy access to GitLab/GitHub/Gitea CI/CD variables for automatic versioning |
| homepage | https://www.bitpowder.com/libs/indigo/ |
| repository | https://gitlab.com/bitpowder/indigo-ng |
| max_upload_size | |
| id | 595306 |
| size | 4,594 |
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;