Skip to content

Commit

Permalink
R4R: make bnbcli to support ledger (#571)
Browse files Browse the repository at this point in the history
* bnbcli support ledger

* update ledger-cosmos-go dependency

* update dependency and remove unecessary change in Makefile

* Update dependency
  • Loading branch information
HaoyangLiu authored and forcodedancing committed May 19, 2022
1 parent b87ec2a commit 6ecc7f0
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 16 deletions.
46 changes: 31 additions & 15 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
[[constraint]]
name = "github.com/cosmos/cosmos-sdk"
source = "github.com/binance-chain/bnc-cosmos-sdk"
version = "=v0.25.0-binance.17"
branch = "develop"

[[constraint]]
name = "github.com/zondax/ledger-cosmos-go"
source = "https://github.com/binance-chain/ledger-cosmos-go"
version = "v0.9.9-binance.1"

[[constraint]]
name = "github.com/btcsuite/btcd"
Expand Down Expand Up @@ -84,6 +89,9 @@
[prune]
go-tests = true
unused-packages = true
[[prune.project]]
name = "github.com/zondax/hid"
unused-packages = false

[[constraint]]
name = "github.com/natefinch/lumberjack"
Expand Down
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,34 @@ endif

all: get_vendor_deps format build

LEDGER_ENABLED ?= true

########################################
### Build/Install

ifeq ($(LEDGER_ENABLED),true)
ifeq ($(OS),Windows_NT)
GCCEXE = $(shell where gcc.exe 2> NUL)
ifeq ($(GCCEXE),)
$(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false)
else
BUILD_TAGS += ledger
endif
else
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),OpenBSD)
$(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988))
else
GCC = $(shell command -v gcc 2> /dev/null)
ifeq ($(GCC),)
$(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false)
else
BUILD_TAGS += ledger
endif
endif
endif
endif

########################################
### CI

Expand Down

0 comments on commit 6ecc7f0

Please sign in to comment.