mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-13 02:37:18 +03:00
Download Jamstash in make setup
This commit is contained in:
parent
23e38ec82f
commit
907c310c01
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
/sonic-server
|
/sonic-server
|
||||||
/iTunes*.xml
|
/iTunes*.xml
|
||||||
static/Jamstash
|
|
||||||
devDb
|
devDb
|
||||||
/tmp
|
/tmp
|
||||||
vendor/*/
|
vendor/*/
|
||||||
@ -8,4 +7,6 @@ wiki
|
|||||||
TODO.md
|
TODO.md
|
||||||
var
|
var
|
||||||
Artwork
|
Artwork
|
||||||
sonic.toml
|
sonic.toml
|
||||||
|
master.zip
|
||||||
|
Jamstash-master
|
||||||
|
9
Makefile
9
Makefile
@ -8,7 +8,7 @@ clean:
|
|||||||
rm -f ${BINARY}
|
rm -f ${BINARY}
|
||||||
|
|
||||||
.PHONY: setup
|
.PHONY: setup
|
||||||
setup:
|
setup: jamstash
|
||||||
@which reflex || (echo "Installing Reflex" && GO111MODULE=off go get -u github.com/cespare/reflex)
|
@which reflex || (echo "Installing Reflex" && GO111MODULE=off go get -u github.com/cespare/reflex)
|
||||||
@which goconvey || (echo "Installing GoConvey" && GO111MODULE=off go get -u github.com/smartystreets/goconvey)
|
@which goconvey || (echo "Installing GoConvey" && GO111MODULE=off go get -u github.com/smartystreets/goconvey)
|
||||||
@which wire || (echo "Installing Wire" && GO111MODULE=off go get -u go get github.com/google/wire/cmd/wire)
|
@which wire || (echo "Installing Wire" && GO111MODULE=off go get -u go get github.com/google/wire/cmd/wire)
|
||||||
@ -16,7 +16,7 @@ setup:
|
|||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run:
|
||||||
@reflex -s -r "(\.go$$|sonic.toml)" -- go run .
|
@reflex -s -r "(\.go$$|sonic.toml)" -R "Jamstash-master" -- go run .
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
@ -30,3 +30,8 @@ convey:
|
|||||||
cloc:
|
cloc:
|
||||||
# cloc can be installed using brew
|
# cloc can be installed using brew
|
||||||
cloc --exclude-dir=devDb,.idea,.vscode,wiki,static --exclude-ext=iml,xml .
|
cloc --exclude-dir=devDb,.idea,.vscode,wiki,static --exclude-ext=iml,xml .
|
||||||
|
|
||||||
|
jamstash:
|
||||||
|
wget -N https://github.com/tsquillario/Jamstash/archive/master.zip
|
||||||
|
unzip -o master.zip
|
||||||
|
rm master.zip
|
||||||
|
6
app.go
6
app.go
@ -48,11 +48,11 @@ func (a *App) initRoutes() {
|
|||||||
r.Use(middleware.Heartbeat("/ping"))
|
r.Use(middleware.Heartbeat("/ping"))
|
||||||
|
|
||||||
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/static/Jamstash", 302)
|
http.Redirect(w, r, "/Jamstash", 302)
|
||||||
})
|
})
|
||||||
workDir, _ := os.Getwd()
|
workDir, _ := os.Getwd()
|
||||||
filesDir := filepath.Join(workDir, "static")
|
filesDir := filepath.Join(workDir, "Jamstash-master/dist")
|
||||||
FileServer(r, "/static", http.Dir(filesDir))
|
FileServer(r, "/Jamstash", http.Dir(filesDir))
|
||||||
|
|
||||||
a.router = r
|
a.router = r
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user