fix: CI rust version mismatch, create empty db (#173)

* fix: create db if does not exists

* chore: update rust version

* chore: bump version to 1.0.1
This commit is contained in:
Ludo Galabru
2023-09-13 16:41:13 -04:00
committed by GitHub
parent d63d17a913
commit cd2842eac7
5 changed files with 8 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -2464,7 +2464,7 @@ dependencies = [
[[package]] [[package]]
name = "ordhook-cli" name = "ordhook-cli"
version = "0.4.0" version = "1.0.1"
dependencies = [ dependencies = [
"clap", "clap",
"clap_generate", "clap_generate",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "ordhook-cli" name = "ordhook-cli"
version = "0.4.0" version = "1.0.1"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -609,6 +609,9 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {
let last_known_block = let last_known_block =
find_latest_inscription_block_height(&inscriptions_db_conn, &ctx)?; find_latest_inscription_block_height(&inscriptions_db_conn, &ctx)?;
if last_known_block.is_none() {
open_readwrite_ordhook_db_conn_rocks_db(&config.expected_cache_path(), &ctx)?;
}
let ordhook_config = config.get_ordhook_config(); let ordhook_config = config.get_ordhook_config();
@@ -664,6 +667,7 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {
Command::Db(OrdhookDbCommand::New(cmd)) => { Command::Db(OrdhookDbCommand::New(cmd)) => {
let config = ConfigFile::default(false, false, false, &cmd.config_path)?; let config = ConfigFile::default(false, false, false, &cmd.config_path)?;
initialize_ordhook_db(&config.expected_cache_path(), &ctx); initialize_ordhook_db(&config.expected_cache_path(), &ctx);
open_readwrite_ordhook_db_conn_rocks_db(&config.expected_cache_path(), &ctx)?;
} }
Command::Db(OrdhookDbCommand::Sync(cmd)) => { Command::Db(OrdhookDbCommand::Sync(cmd)) => {
let config = ConfigFile::default(false, false, false, &cmd.config_path)?; let config = ConfigFile::default(false, false, false, &cmd.config_path)?;

View File

@@ -4,7 +4,7 @@ WORKDIR /src
RUN apt update && apt install -y ca-certificates pkg-config libssl-dev libclang-11-dev RUN apt update && apt install -y ca-certificates pkg-config libssl-dev libclang-11-dev
RUN rustup update 1.67.0 && rustup default 1.67.0 RUN rustup update 1.72.0 && rustup default 1.72.0
COPY ./components/ordhook-cli /src/components/ordhook-cli COPY ./components/ordhook-cli /src/components/ordhook-cli

View File

@@ -1,2 +1,2 @@
[toolchain] [toolchain]
channel = "1.67.0" channel = "1.72.0"