mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
build: releases with actions and docker
This commit is contained in:
parent
773e57afe6
commit
2e8d0950c1
6 changed files with 191 additions and 0 deletions
38
Makefile
Normal file
38
Makefile
Normal file
|
@ -0,0 +1,38 @@
|
|||
.PHONY: test
|
||||
.POSIX:
|
||||
.SUFFIXES:
|
||||
|
||||
SERVICE = autobrr
|
||||
GO = go
|
||||
RM = rm
|
||||
GOFLAGS =
|
||||
PREFIX = /usr/local
|
||||
BINDIR = bin
|
||||
|
||||
all: clean build
|
||||
|
||||
deps:
|
||||
cd web && yarn install
|
||||
go mod download
|
||||
|
||||
test:
|
||||
go test $(go list ./... | grep -v test/integration)
|
||||
|
||||
build: deps build/web build/app
|
||||
|
||||
build/app:
|
||||
go build -o bin/$(SERVICE) cmd/$(SERVICE)/main.go
|
||||
|
||||
build/web:
|
||||
cd web && yarn build
|
||||
|
||||
build/docker:
|
||||
docker build -t autobrr:dev -f Dockerfile .
|
||||
|
||||
clean:
|
||||
$(RM) -rf bin
|
||||
|
||||
install: all
|
||||
echo $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||
cp -f bin/$(SERVICE) $(DESTDIR)$(PREFIX)/$(BINDIR)
|
Loading…
Add table
Add a link
Reference in a new issue