Skip to content

Commit

Permalink
Merge pull request #172 from dineshba/mod
Browse files Browse the repository at this point in the history
Change makefiles and readme
  • Loading branch information
Scott McAllister authored Nov 10, 2019
2 parents 94ee1c5 + 2dbe542 commit e96b2a1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ jobs:
build:
docker:
- image: circleci/golang:1.12
working_directory: /go/src/github.com/PagerDuty/go-pagerduty
steps:
- checkout
- run:
name: "Build"
command: make build
command: make build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin/*
*.swp
pd
vendor/
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@
# go build -o $(BINARY) command/*

.PHONY: build
build:
go get ./...
# go test -v -race -cover ./...
# go tool vet $(SOURCES)

GOPATH?=$(shell go env GOPATH)
GO111MODULE=auto

build: build-deps
go build -mod=vendor -o pd ./command
build-deps:
go get
go mod verify
go mod vendor

install: build
cp pd $(GOPATH)/bin

.PHONY: test
test:
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ go get github.com/PagerDuty/go-pagerduty
Next build the application.
```cli
cd $GOPATH/src/github.com/PagerDuty/go-pagerduty
go build -o $GOPATH/bin/pd command/*
```
If you do not have the dependencies necessary to build the project, run this in the project root and try again

```cli
go get ./...
make install
```

## Usage
Expand Down

0 comments on commit e96b2a1

Please sign in to comment.