mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
makefile+travis: add install and build commands
Build executables are suffixed with 'debug' because we cannot create a loopd executable in the root repo dir, since there is an already existing loopd executable. Add build to travis.
This commit is contained in:
parent
8301abdb4c
commit
41550a9c4b
3 changed files with 24 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -24,6 +24,9 @@ _testmain.go
|
||||||
*.test
|
*.test
|
||||||
*.prof
|
*.prof
|
||||||
|
|
||||||
|
/loop-debug
|
||||||
|
/loopd-debug
|
||||||
|
|
||||||
output*.log
|
output*.log
|
||||||
|
|
||||||
loop
|
loop
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ sudo: required
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- export GO111MODULE=on
|
- export GO111MODULE=on
|
||||||
- make lint unit
|
- make lint unit build
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||||
|
|
|
||||||
19
Makefile
19
Makefile
|
|
@ -3,6 +3,11 @@ PKG := github.com/lightninglabs/loop
|
||||||
GOTEST := GO111MODULE=on go test -v
|
GOTEST := GO111MODULE=on go test -v
|
||||||
|
|
||||||
GO_BIN := ${GOPATH}/bin
|
GO_BIN := ${GOPATH}/bin
|
||||||
|
GOBUILD := GO111MODULE=on go build -v
|
||||||
|
GOINSTALL := GO111MODULE=on go install -v
|
||||||
|
|
||||||
|
COMMIT := $(shell git describe --abbrev=40 --dirty)
|
||||||
|
LDFLAGS := -ldflags "-X $(PKG)/build.Commit=$(COMMIT)"
|
||||||
|
|
||||||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||||
GOLIST := go list $(PKG)/... | grep -v '/vendor/'
|
GOLIST := go list $(PKG)/... | grep -v '/vendor/'
|
||||||
|
|
@ -34,3 +39,17 @@ fmt:
|
||||||
lint: $(LINT_BIN)
|
lint: $(LINT_BIN)
|
||||||
@$(call print, "Linting source.")
|
@$(call print, "Linting source.")
|
||||||
$(LINT)
|
$(LINT)
|
||||||
|
|
||||||
|
# ============
|
||||||
|
# INSTALLATION
|
||||||
|
# ============
|
||||||
|
|
||||||
|
build:
|
||||||
|
@$(call print, "Building debug loop and loopd.")
|
||||||
|
$(GOBUILD) -o loop-debug $(LDFLAGS) $(PKG)/cmd/loop
|
||||||
|
$(GOBUILD) -o loopd-debug $(LDFLAGS) $(PKG)/cmd/loopd
|
||||||
|
|
||||||
|
install:
|
||||||
|
@$(call print, "Installing loop and loopd.")
|
||||||
|
$(GOINSTALL) $(LDFLAGS) $(PKG)/cmd/loop
|
||||||
|
$(GOINSTALL) $(LDFLAGS) $(PKG)/cmd/loopd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue