It is hard to tell what version or what git commit this relayer is currently running? which makes me think we should embed these information in the result binary at compile-time so that we can return these info in the /api/v1/info endpoint. This will be super useful in the future (for now here is a tease for future usage of this: relayerup clone https://relayer1.webb.tools :shushing_face: )
Example
By default, most of the information we add in Cargo.toml are already exposed as CARGO_* env during compile time, for example:
Overview
It is hard to tell what version or what git commit this relayer is currently running? which makes me think we should embed these information in the result binary at compile-time so that we can return these info in the
/api/v1/info
endpoint. This will be super useful in the future (for now here is a tease for future usage of this:relayerup clone https://relayer1.webb.tools
:shushing_face: )Example
By default, most of the information we add in Cargo.toml are already exposed as
CARGO_*
env during compile time, for example:For more, you can read about it here.
This will tell cargo to set this env for us, so that we can do the following in our main program:
Expected Response
Utilizing this in Our CI/CD, and reading that in our code, we want to have something like the following in our
/api/v1/info
Task Checklist
build-data
cratebuild.rs
Cargo.toml
matches the version of the tag relesae./api/v1/info
endpoint.