Skip to content

Commit

Permalink
Dzejkop/add-initial-log (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzejkop authored Apr 22, 2024
1 parent 76608f2 commit 1a9fb8c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ keywords = ["worldcoin", "protocol", "signup"]
categories = ["cryptography::cryptocurrencies"]
readme = "Readme.md"
license-file = "LICENSE.md"
build = "build.rs"

[workspace]
members = ["crates/*"]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY . .

# Install dependencies
RUN apt-get update && \
apt-get install -y curl build-essential libssl-dev texinfo libcap2-bin pkg-config
apt-get install -y git curl build-essential libssl-dev texinfo libcap2-bin pkg-config

# TODO: Use a specific version of rustup
# Install rustup
Expand Down
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use std::process::Command;

fn main() {
let output = Command::new("git")
.args(["describe", "--tags", "--always"])
.output()
.expect("Failed to execute git command");

let git_description = String::from_utf8_lossy(&output.stdout).trim().to_string();

println!("cargo:rustc-env=GIT_VERSION={}", git_description);
}
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ async fn sequencer_app(args: Args) -> anyhow::Result<()> {

watch_shutdown_signals();

let version = env!("GIT_VERSION");

tracing::info!(?config, version, "Starting the app");

let server_config = config.server.clone();

// Create App struct
Expand Down

0 comments on commit 1a9fb8c

Please sign in to comment.