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

Commit aec330a

Browse files
bors[bot]thomaseizingerFranck Royer
authored
Merge #226
226: Make unix-socket of shiplift a default feature r=D4nte a=thomaseizinger This allows the use of `cargo` on *nix systems without having to pass any additional features. Co-authored-by: Thomas Eizinger <thomas@eizinger.io> Co-authored-by: Franck Royer <franck@coblox.tech>
2 parents c8357ca + f3e8c16 commit aec330a

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

Cargo.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ tokio = "0.1"
3232
toml = "0.5"
3333
web3 = { version = "0.8", default-features = false, features = ["http"] }
3434

35+
[features]
36+
default = ["shiplift/unix-socket"]
37+
3538
[build-dependencies]
3639
anyhow = "1.0.23"
3740
flate2 = "1.0.13"

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ CARGO = $(RUSTUP) run --install $(TOOLCHAIN) cargo --color always
66
NIGHTLY_TOOLCHAIN = "nightly-2019-07-31"
77
CARGO_NIGHTLY = $(RUSTUP) run --install $(NIGHTLY_TOOLCHAIN) cargo --color always
88

9-
ifneq ($(OS),Windows_NT)
10-
BUILD_ARGS := --features shiplift/unix-socket
9+
# cannot use the unix-socket to talk to the docker daemon on windows
10+
ifeq ($(OS),Windows_NT)
11+
BUILD_ARGS := --no-default-features
12+
TEST_ARGS := --no-default-features
13+
INSTALL_ARGS := --no-default-features
1114
endif
1215

1316
build: build_debug
@@ -33,7 +36,7 @@ install_tomlfmt: install_rust
3336
## User install
3437

3538
install:
36-
$(CARGO) install --force --path .
39+
$(CARGO) install --force --path . $(INSTALL_ARGS)
3740

3841
clean:
3942
$(CARGO) clean
@@ -55,7 +58,7 @@ clippy: install_clippy
5558
$(CARGO) clippy --all-targets -- -D warnings
5659

5760
test:
58-
$(CARGO) test --all
61+
$(CARGO) test --all $(TEST_ARGS)
5962

6063
doc:
6164
$(CARGO) doc

0 commit comments

Comments
 (0)