Skip to content
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

RPPL-1565 auto version increment for ripple artifacts (eos-ripple) #596

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions core/main/Cargo.toml
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ jaq-core = "1.5.0"
jaq-std = { version = "1.5.1", default-features = false }

openrpc_validator = { path = "../../openrpc_validator" }
cargo-release = "0.25.10"

[build-dependencies]
vergen = "1"
10 changes: 9 additions & 1 deletion core/main/src/main.rs
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ use ripple_sdk::{
utils::logger::init_and_configure_logger,
};
use state::bootstrap_state::BootstrapState;
use std::env;
pub mod bootstrap;
pub mod broker;
pub mod firebolt;
@@ -33,12 +34,19 @@ include!(concat!(env!("OUT_DIR"), "/version.rs"));

#[tokio::main(worker_threads = 2)]
async fn main() {
// Check for --version flag
let args: Vec<String> = env::args().collect();
if args.contains(&"--version".to_string()) {
println!("Ripple version {}", env!("CARGO_PKG_VERSION"));
return;
}

// Init logger
if let Err(e) = init_and_configure_logger(SEMVER_LIGHTWEIGHT, "gateway".into()) {
println!("{:?} logger init error", e);
return;
}
info!("version {}", SEMVER_LIGHTWEIGHT);
info!("version {}", env!("CARGO_PKG_VERSION"));
let bootstate = BootstrapState::build().expect("Failure to init state for bootstrap");

// bootstrap
2 changes: 1 addition & 1 deletion openrpc_validator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ edition = "2021"
jsonschema = { version = "0.17.1", default-features = false }
serde_json.workspace = true
serde.workspace = true
clap = {version = "=4.0", features = ["std"], default-features = false} # std required during ripple start
clap = {version = "4.5.13", features = ["std"], default-features = false} # std required during ripple start
5 changes: 5 additions & 0 deletions ripple
Original file line number Diff line number Diff line change
@@ -117,6 +117,11 @@ case ${1} in
cargo build --features local_dev
cargo run --features local_dev core/main
;;
"--version")
# Navigate to an actual package directory within the workspace
workspace_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "Ripple version $(cargo pkgid --manifest-path "${workspace_dir}/core/main/Cargo.toml" | sed 's/.*#//')"
;;
"-h")
print_help
;;