Skip to content

Commit

Permalink
fix: CI rust version mismatch, create empty db (#173)
Browse files Browse the repository at this point in the history
* fix: create db if does not exists

* chore: update rust version

* chore: bump version to 1.0.1
  • Loading branch information
lgalabru committed Sep 13, 2023
1 parent d63d17a commit cd2842e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/ordhook-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ordhook-cli"
version = "0.4.0"
version = "1.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 4 additions & 0 deletions components/ordhook-cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {

let last_known_block =
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();

Expand Down Expand Up @@ -664,6 +667,7 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {
Command::Db(OrdhookDbCommand::New(cmd)) => {
let config = ConfigFile::default(false, false, false, &cmd.config_path)?;
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)) => {
let config = ConfigFile::default(false, false, false, &cmd.config_path)?;
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/components/ordhook.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /src

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

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.67.0"
channel = "1.72.0"

0 comments on commit cd2842e

Please sign in to comment.