Skip to content

Commit

Permalink
Use version spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 30, 2024
1 parent a353c09 commit 6f7e724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions crates/core/src/flow/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ impl Tool {
};

// Create a new product since we need to change the version for each bin
let tool_dir = self
.inventory
.create_product(&VersionSpec::Semantic(SemVer(bin_version)))
.dir;
let tool_dir = self.inventory.create_product(&bin_version).dir;

let input_path = tool_dir.join(
bin.config
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/flow/locate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use crate::layout::BinManager;
use crate::tool::Tool;
use proto_pdk_api::{ExecutableConfig, LocateExecutablesInput, LocateExecutablesOutput};
use proto_shim::{get_exe_file_name, get_shim_file_name};
use semver::Version;
use serde::Serialize;
use starbase_utils::fs;
use std::env;
use std::path::{Path, PathBuf};
use tracing::{debug, instrument};
use version_spec::VersionSpec;

// Executable = File within the tool's install directory
// Binary/shim = File within proto's store directories
Expand All @@ -21,7 +21,7 @@ pub struct ExecutableLocation {
pub path: PathBuf,

#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<Version>,
pub version: Option<VersionSpec>,
}

impl Tool {
Expand Down Expand Up @@ -159,7 +159,7 @@ impl Tool {
.join(get_exe_file_name(&versioned_name)),
name: versioned_name,
config: config.clone(),
version: resolved_version.as_version().map(|v| v.to_owned()),
version: Some((*resolved_version).to_owned()),
});
}
}
Expand Down

0 comments on commit 6f7e724

Please sign in to comment.