Skip to content

Add build info to sentry report #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: blob:none

- name: Create env file
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: blob:none

- name: Create env file
run: |
Expand Down
148 changes: 146 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM rust:1.84.1

# Install needed packages and clean up
RUN apt update && \
apt install -y --no-install-recommends lsb-release wget software-properties-common gnupg gcc-multilib && \
apt install -y --no-install-recommends lsb-release wget software-properties-common gnupg gcc-multilib git && \
rm -rf /var/lib/apt/lists/*

# Install clang and clean up
Expand All @@ -25,3 +25,6 @@ ARG CACHEBUST
# Install MSFS2020 and MSFS2024 SDK
RUN cargo-msfs install msfs2020 && \
cargo-msfs install msfs2024

# Needed when running in CI/CD to avoid dubious ownership errors
RUN git config --global --add safe.directory /workspace
3 changes: 3 additions & 0 deletions src/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ serde_rusqlite = "0.36.0"
serde_with = "3.12.0"
uuid = { version = "1.16.0", features = ["rng-rand", "v4"] }
zip = { version = "2.5.0", default-features = false, features = ["deflate"] }

[build-dependencies]
vergen-gitcl = { version = "1.0.8", features = ["build", "cargo"] }
15 changes: 15 additions & 0 deletions src/wasm/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use vergen_gitcl::{BuildBuilder, CargoBuilder, Emitter, GitclBuilder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let build = BuildBuilder::all_build()?;
let cargo = CargoBuilder::all_cargo()?;
let gitcl = GitclBuilder::all_git()?;

Emitter::default()
.add_instructions(&build)?
.add_instructions(&cargo)?
.add_instructions(&gitcl)?
.emit()?;

Ok(())
}
6 changes: 6 additions & 0 deletions src/wasm/src/sentry_gauge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ where
..Default::default()
}));

// Build specific settings
scope.set_tag("git_sha", env!("VERGEN_GIT_SHA"));
scope.set_tag("git_dirty", env!("VERGEN_GIT_DIRTY"));
scope.set_tag("built_at", env!("VERGEN_BUILD_TIMESTAMP"));

// Addon specific settings
let config = Config::get_config();
scope.set_tag(
"developer",
Expand Down