🐳 Add Git version printout when ptth_relay launches
parent
04cfaf75e1
commit
e99ace3ca0
|
@ -21,7 +21,7 @@ ARG gitcommithash=HEAD
|
||||||
|
|
||||||
RUN git checkout "$gitcommithash" \
|
RUN git checkout "$gitcommithash" \
|
||||||
&& git reset --hard \
|
&& git reset --hard \
|
||||||
&& echo "pub const GIT_VERSION: &str = \"$(git-rev-parse HEAD)\";" > src/git_version.rs \
|
&& echo "pub const GIT_VERSION: Option <&str> = Some (\"$(git-rev-parse HEAD)\");" > src/git_version.rs \
|
||||||
&& cargo test --release \
|
&& cargo test --release \
|
||||||
&& cargo build --release --bin ptth_relay
|
&& cargo build --release --bin ptth_relay
|
||||||
|
|
||||||
|
|
|
@ -19,5 +19,7 @@ async fn main () -> Result <(), Box <dyn Error>> {
|
||||||
toml::from_str (&config_s).expect (&format! ("Can't parse {:?} as TOML", config_file_path))
|
toml::from_str (&config_s).expect (&format! ("Can't parse {:?} as TOML", config_file_path))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
eprintln! ("ptth_relay Git version: {:?}", ptth::git_version::GIT_VERSION);
|
||||||
|
|
||||||
ptth::relay::main (config_file).await
|
ptth::relay::main (config_file).await
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
pub const GIT_VERSION: Option <&str> = None;
|
|
@ -10,6 +10,7 @@ pub const PTTH_MAGIC_HEADER: &str = "X-PTTH-2LJYXWC4";
|
||||||
// Basically binaries, but in the lib we can do experimental
|
// Basically binaries, but in the lib we can do experimental
|
||||||
// test stuff like spawn them both in the same process
|
// test stuff like spawn them both in the same process
|
||||||
|
|
||||||
|
pub mod git_version;
|
||||||
pub mod relay;
|
pub mod relay;
|
||||||
pub mod server;
|
pub mod server;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue