mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
build(make): improve install command (#1945)
* chore(makefile): remove web/dist/* on make clean * chore(makefile): use install command * chore(makefile): add .gitkeep to public folder * chore(web): remove duplicated web/.gitignore
This commit is contained in:
parent
aef62a93a6
commit
0d5902c8f6
3 changed files with 6 additions and 46 deletions
12
Makefile
12
Makefile
|
@ -8,6 +8,7 @@ GIT_TAG := $(shell git describe --abbrev=0 --tags)
|
|||
SERVICE = autobrr
|
||||
GO = go
|
||||
RM = rm
|
||||
INSTALL = install
|
||||
GOFLAGS = "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
|
||||
PREFIX = /usr/local
|
||||
BINDIR = bin
|
||||
|
@ -32,21 +33,20 @@ build/ctl:
|
|||
|
||||
build/web:
|
||||
pnpm --dir web run build
|
||||
@touch web/dist/.gitkeep 2>/dev/null # To avoid accidental commit of the deletionn
|
||||
|
||||
build/docker:
|
||||
docker build -t autobrr:dev -f Dockerfile . --build-arg GIT_TAG=$(GIT_TAG) --build-arg GIT_COMMIT=$(GIT_COMMIT)
|
||||
|
||||
clean:
|
||||
$(RM) -rf bin
|
||||
$(RM) -rf bin web/dist/*
|
||||
|
||||
install-man:
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
||||
cp -f docs/man/autobrr.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
||||
$(INSTALL) -m644 docs/man/autobrr.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/autobrr.1
|
||||
|
||||
install: all install-man
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||
cp -f bin/$(SERVICE) $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||
$(INSTALL) -m755 bin/$(SERVICE) $(DESTDIR)$(PREFIX)/$(BINDIR)/$(SERVICE)
|
||||
|
||||
dev:
|
||||
@if ! command -v tmux >/dev/null 2>&1; then \
|
||||
|
|
40
web/.gitignore
vendored
40
web/.gitignore
vendored
|
@ -1,40 +0,0 @@
|
|||
# Logs and databases #
|
||||
######################
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
*.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
*.db*
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Other
|
||||
.idea
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
node_modules/
|
||||
web/build
|
||||
bin/
|
||||
log/
|
||||
dist/*
|
||||
!dist/.gitkeep
|
||||
# If needed, package-lock.json shall be added
|
||||
# manually using an explicit git add command.
|
||||
package-lock.json
|
||||
# Ditto for yarn, except we're using npm.
|
||||
yarn.lock
|
0
web/public/.gitkeep
Normal file
0
web/public/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue