Skip to content

Commit

Permalink
Prefer libherokubuildpack inventory module (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
runesoerensen authored Nov 1, 2024
1 parent c5f2030 commit a6da00d
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 60 deletions.
114 changes: 65 additions & 49 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ sha2 = "0.10"
toml = "0.8"
chrono = {version = "0.4", features = ["serde"] }
serde = {version = "1.0", features = ["derive"] }
inventory = { git = "https://github.com/Malax/inventory", features = ["sha2"] }
rayon = "1.10"
hex = "0.4.3"
gem_version = "0.3"
libherokubuildpack = { version = "0.24.0", default-features = false, features = ["inventory", "inventory-sha2"] }

# File locking (FLOCK)
fs2 = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion jruby_executable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tar = { workspace = true}
tempfile = { workspace = true}
thiserror = { workspace = true}
bullet_stream = { workspace = true }
inventory = { workspace = true }
libherokubuildpack = { workspace = true }
chrono = { workspace = true }
sha2 = { workspace = true }
gem_version = { workspace = true }
3 changes: 2 additions & 1 deletion jruby_executable/src/bin/jruby_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ use clap::Parser;
use fs_err::PathExt;
use gem_version::GemVersion;
use indoc::formatdoc;
use inventory::artifact::{Arch, Artifact};
use jruby_executable::jruby_build_properties;
use libherokubuildpack::inventory;
use libherokubuildpack::inventory::artifact::{Arch, Artifact};
use shared::{
append_filename_with, artifact_is_different, artifact_same_url_different_checksum,
atomic_inventory_update, download_tar, sha256_from_path, source_dir, tar_dir_to_file,
Expand Down
2 changes: 1 addition & 1 deletion jruby_executable/src/bin/jruby_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use bullet_stream::{style, Print};
use clap::Parser;
use fun_run::CommandWithName;
use indoc::formatdoc;
use inventory::artifact::Arch;
use jruby_executable::jruby_build_properties;
use libherokubuildpack::inventory::artifact::Arch;
use shared::{source_dir, BaseImage};
use std::error::Error;
use std::io::Write;
Expand Down
2 changes: 1 addition & 1 deletion ruby_executable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tar = { workspace = true}
tempfile = { workspace = true}
thiserror = { workspace = true}
bullet_stream = { workspace = true }
inventory = { workspace = true }
libherokubuildpack = { workspace = true }
chrono = { workspace = true }
sha2 = { workspace = true }
gem_version = { workspace = true }
5 changes: 4 additions & 1 deletion ruby_executable/src/bin/ruby_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use fs_err::PathExt;
use fun_run::CommandWithName;
use gem_version::GemVersion;
use indoc::{formatdoc, indoc};
use inventory::artifact::{Arch, Artifact};
use libherokubuildpack::inventory::{
self,
artifact::{Arch, Artifact},
};
use shared::{
append_filename_with, artifact_is_different, artifact_same_url_different_checksum,
atomic_inventory_update, download_tar, output_tar_path, sha256_from_path, source_dir,
Expand Down
2 changes: 1 addition & 1 deletion ruby_executable/src/bin/ruby_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bullet_stream::{style, Print};
use clap::Parser;
use fun_run::CommandWithName;
use indoc::formatdoc;
use inventory::artifact::Arch;
use libherokubuildpack::inventory::artifact::Arch;
use shared::{output_tar_path, source_dir, BaseImage, RubyDownloadVersion};
use std::{error::Error, path::PathBuf, process::Command};

Expand Down
2 changes: 1 addition & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sha2 = { workspace = true }
chrono = { workspace = true }
serde = { workspace = true }
toml = { workspace = true }
inventory = { workspace = true }
libherokubuildpack = { workspace = true }
fs2 = { workspace = true }
rayon = { workspace = true }
hex = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions shared/src/inventory_help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::{download_tar, Error, TarDownloadPath};
use chrono::{DateTime, Utc};
use fs2::FileExt;
use gem_version::GemVersion;
use inventory::checksum::Checksum;
use inventory::inventory::Inventory;
use libherokubuildpack::inventory::checksum::Checksum;
use libherokubuildpack::inventory::{self, Inventory};
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
use sha2::Sha256;
Expand Down
2 changes: 1 addition & 1 deletion shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bullet_stream::state::SubBullet;
use bullet_stream::Print;
use fs_err::{File, PathExt};
use fun_run::CommandWithName;
use inventory::artifact::Arch;
use libherokubuildpack::inventory::artifact::Arch;
use std::io::{Read, Seek, SeekFrom, Write};
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down

0 comments on commit a6da00d

Please sign in to comment.