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

Add the initial Grid SDK #12

Merged
merged 3 commits into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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