mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 19:20:37 +03:00
Adding a Makefile
This commit is contained in:
parent
8d54d42404
commit
12e7100325
38
Makefile
Normal file
38
Makefile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#@IgnoreInspection BashAddShebang
|
||||||
|
|
||||||
|
BINARY=gosonic
|
||||||
|
|
||||||
|
SOURCES := $(shell find . -name '*.go')
|
||||||
|
|
||||||
|
all: $(BINARY)
|
||||||
|
|
||||||
|
$(BINARY): $(SOURCES)
|
||||||
|
go build
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -f ${BINARY}
|
||||||
|
|
||||||
|
.PHONY: setup
|
||||||
|
setup:
|
||||||
|
go get -u github.com/beego/bee # bee command line tool
|
||||||
|
go get -u github.com/smartystreets/goconvey # test runnner
|
||||||
|
go get -u github.com/kardianos/govendor # dependency manager
|
||||||
|
govendor sync # download all dependencies
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run:
|
||||||
|
bee run -e vendor -e tests
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test:
|
||||||
|
BEEGO_RUNMODE=test go test `go list ./...|grep -v vendor` -v
|
||||||
|
|
||||||
|
.PHONY: convey
|
||||||
|
convey:
|
||||||
|
NOLOG=1 goconvey --port 9090 -excludedDirs vendor,static,devDb,wiki,bin,tests
|
||||||
|
|
||||||
|
.PHONY: cloc
|
||||||
|
cloc:
|
||||||
|
# cloc can be installed using brew
|
||||||
|
cloc --exclude-dir=devDb,.idea,.vscode,wiki,static,vendor --exclude-ext=iml,xml .
|
10
README.md
10
README.md
@ -44,19 +44,17 @@ You will need to install [Go 1.7](https://golang.org/dl/)
|
|||||||
|
|
||||||
Then install dependencies:
|
Then install dependencies:
|
||||||
```
|
```
|
||||||
$ go get github.com/beego/bee # bee command line tool
|
$ make setup
|
||||||
$ go get github.com/kardianos/govendor # dependency manager
|
|
||||||
$ govendor fetch
|
|
||||||
```
|
```
|
||||||
|
|
||||||
From here it's a normal [BeeGo](http://beego.me) development cycle. Some useful commands:
|
Some useful commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start local server (with hot reload)
|
# Start local server (with hot reload)
|
||||||
$ bee run
|
$ make run
|
||||||
|
|
||||||
# Run all tests
|
# Run all tests
|
||||||
$ go test `go list ./...|grep -v vendor` -v
|
$ make test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user