Skip to content

Commit

Permalink
update invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol committed May 12, 2023
1 parent 710ae98 commit 600be9e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 7 additions & 10 deletions crates/cdk/src/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ pub struct PublishCmd {
#[arg(long, hide_short_help = true)]
push: bool,

/// provide target platform for the package. Optional. By default the host's one is used.
#[arg(
long,
default_value_t = current_platform::CURRENT_PLATFORM.to_string()
)]
target: String,

#[arg(long, hide_short_help = true)]
remote: Option<String>,

Expand Down Expand Up @@ -87,7 +80,7 @@ impl PublishCmd {
.as_ref()
.map(PathBuf::from)
.unwrap_or_else(|| hubdir.join(hubutil::HUB_PACKAGE_META));
let pkgdata = package_assemble(pkgmetapath, &self.target, &access)?;
let pkgdata = package_assemble(pkgmetapath, &opt.target, &access)?;
package_push(self, &pkgdata, &access)?;
}

Expand All @@ -98,7 +91,7 @@ impl PublishCmd {
.as_ref()
.map(PathBuf::from)
.unwrap_or_else(|| hubdir.join(hubutil::HUB_PACKAGE_META));
package_assemble(pkgmetapath, &self.target, &access)?;
package_assemble(pkgmetapath, &opt.target, &access)?;
}

// --push only, needs ipkg file
Expand Down Expand Up @@ -140,7 +133,11 @@ pub fn package_push(opts: &PublishCmd, pkgpath: &str, access: &HubAccess) -> Res
verify_public_or_exit()?;
}
}
if let Err(e) = run_block_on(hubutil::push_package_conn(pkgpath, access, &opts.target)) {
if let Err(e) = run_block_on(hubutil::push_package_conn(
pkgpath,
access,
&opts.package.target,
)) {
eprintln!("{e}");
std::process::exit(1);
}
Expand Down
6 changes: 4 additions & 2 deletions crates/fluvio-connector-deployer/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ pub(crate) fn deploy_local<P: AsRef<Path>>(
(Stdio::inherit(), Stdio::inherit(), true)
};

let executable = canonicalize(&deployment.executable)
.context("Executable file path is invalid or file does not exist")?;
let executable = canonicalize(&deployment.executable).context(format!(
"Executable file path ({}) is invalid or file does not exist",
deployment.executable.to_string_lossy()
))?;
debug!("running executable: {}", &executable.to_string_lossy());
let mut cmd = Command::new(executable);
cmd.stdin(Stdio::null());
Expand Down
4 changes: 2 additions & 2 deletions tests/cli/cdk_smoke_tests/cdk-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ setup_file() {
@test "Build and test connector" {
# Test
cd $CONNECTOR_DIR
run $CDK_BIN test \
run $CDK_BIN test --target x86_64-unknown-linux-gnu \
$CONFIG_FILE_FLAG
assert_success

Expand All @@ -44,7 +44,7 @@ setup_file() {

# Deploy
cd $CONNECTOR_DIR
run $CDK_BIN deploy start --target x86_64-unknown-linux-gnu \
run $CDK_BIN deploy --target x86_64-unknown-linux-gnu start \
$CONFIG_FILE_FLAG
assert_success

Expand Down

0 comments on commit 600be9e

Please sign in to comment.