Skip to content

Commit

Permalink
Build and run cdk-client
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Jul 15, 2024
1 parent 324a888 commit fe840a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif
GOBASE := $(shell pwd)
GOBIN := $(GOBASE)/dist
GOENVVARS := GOBIN=$(GOBIN) CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH)
GOBINARY := cdk
GOBINARY := cdk-client
GOCMD := $(GOBASE)/cmd

LDFLAGS += -X 'github.com/0xPolygon/cdk.Version=$(VERSION)'
Expand Down
7 changes: 5 additions & 2 deletions crates/cdk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ use std::process::Command;
fn main() {
// Determine the directory where the build script is located
let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let build_path = PathBuf::from(dir + "../../");
let build_path = PathBuf::from(dir + "/../..");

println!("cargo:rerun-if-changed=build.rs");

// Optionally, specify the directory where your Makefile is located
// For this example, it's assumed to be the same as the build script's directory
// If your Makefile is in a different directory, adjust `build_path` accordingly

// Call the make command
let output = Command::new("make")
let output = Command::new("/bin/make")
.arg("build") // Create a new make command
.current_dir(build_path) // Set the current directory for the command
.output() // Execute the command and capture the output
.expect("Failed to execute make command");
Expand Down
2 changes: 1 addition & 1 deletion crates/cdk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::sync::Arc;
mod cli;
mod logging;

const CDK_CLIENT_PATH: &str = "cdk-client";
const CDK_CLIENT_PATH: &str = "dist/cdk-client";
const CDK_ERIGON_PATH: &str = "cdk-erigon";

fn main() -> anyhow::Result<()> {
Expand Down

0 comments on commit fe840a8

Please sign in to comment.