Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from Cargill/agunde406-grid-sdk
Browse files Browse the repository at this point in the history
Add the initial Grid SDK
  • Loading branch information
agunde406 authored Mar 19, 2019
2 parents 5acab78 + 4085f41 commit 7131915
Show file tree
Hide file tree
Showing 16 changed files with 404 additions and 243 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ contracts/track_and_trace/bin/
contracts/track_and_trace/target/
contracts/track_and_trace/src/messages/

sdk/Cargo.lock
sdk/target

# Node
**/node_modules
**/package-lock.json
Expand Down
7 changes: 2 additions & 5 deletions contracts/track_and_trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ rust-crypto = "0.2.36"
rustc-serialize = "0.3.22"
sawtooth-zmq = "0.8.2-dev5"
clap = "2"
protobuf = "2"
grid-sdk = { path = "../../sdk" }
log = "0.3.0"
log4rs = "0.7.0"

[build-dependencies]
protoc-rust = "2"
glob = "0.2"
protobuf = "2"
7 changes: 6 additions & 1 deletion contracts/track_and_trace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ RUN apt-get update && apt-get install -y protobuf-compiler
# - /grid/contracts/track_and_trace/src/messages/
WORKDIR /grid
RUN USER=root cargo new --bin contracts/track_and_trace
RUN USER=root cargo new --lib sdk --name grid-sdk

# copy grid-sdk to build track and trace
WORKDIR /grid/sdk
COPY sdk ./

WORKDIR /grid/contracts/track_and_trace
COPY Cargo.toml Cargo.lock* ./
COPY contracts/track_and_trace/Cargo.toml contracts/track_and_trace/Cargo.lock* ./
RUN cargo build

ENV PATH=$PATH:/grid/contracts/track_and_trace/target/debug/
Expand Down
Loading

0 comments on commit 7131915

Please sign in to comment.