mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
add check target
This commit is contained in:
parent
310eba694f
commit
0937a9a4b5
13
Makefile
13
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: archive archive_directory archlinux clean directory push version
|
||||
.PHONY: archive archive_directory archlinux check clean directory push version
|
||||
.DEFAULT_GOAL := archlinux
|
||||
|
||||
PROJECT := ahriman
|
||||
@ -7,10 +7,6 @@ FILES := COPYING CONFIGURING.md README.md package src setup.py
|
||||
TARGET_FILES := $(addprefix $(PROJECT)/, $(FILES))
|
||||
IGNORE_FILES := package/archlinux src/.mypy_cache
|
||||
|
||||
ifndef VERSION
|
||||
$(error VERSION is not set)
|
||||
endif
|
||||
|
||||
$(TARGET_FILES) : $(addprefix $(PROJECT), %) : $(addprefix ., %) directory version
|
||||
@cp -rp $< $@
|
||||
|
||||
@ -28,6 +24,10 @@ archlinux: archive
|
||||
sed -i "/sha512sums=('[0-9A-Fa-f]*/s/[^'][^)]*/sha512sums=('$$(sha512sum $(PROJECT)-$(VERSION)-src.tar.xz | awk '{print $$1}')'/" package/archlinux/PKGBUILD
|
||||
sed -i "s/pkgver=[0-9.]*/pkgver=$(VERSION)/" package/archlinux/PKGBUILD
|
||||
|
||||
check:
|
||||
cd src && mypy --strict -p $(PROJECT)
|
||||
cd src && find $(PROJECT) -name '*.py' -execdir autopep8 --max-line-length 120 -aa -i {} +
|
||||
|
||||
clean:
|
||||
find . -type f -name '$(PROJECT)-*-src.tar.xz' -delete
|
||||
rm -rf "$(PROJECT)"
|
||||
@ -43,4 +43,7 @@ push: archlinux
|
||||
git push --tags
|
||||
|
||||
version:
|
||||
ifndef VERSION
|
||||
$(error VERSION is required, but not set)
|
||||
endif
|
||||
sed -i "/__version__ = '[0-9.]*/s/[^'][^)]*/__version__ = '$(VERSION)'/" src/ahriman/version.py
|
||||
|
@ -43,6 +43,15 @@ class Rsync(Uploader):
|
||||
sync data to remote server
|
||||
:param path: local path to sync
|
||||
'''
|
||||
check_output('rsync', '--archive', '--verbose', '--compress', '--partial', '--progress', '--delete', path, self.remote,
|
||||
exception=None,
|
||||
logger=self.logger)
|
||||
check_output(
|
||||
'rsync',
|
||||
'--archive',
|
||||
'--verbose',
|
||||
'--compress',
|
||||
'--partial',
|
||||
'--progress',
|
||||
'--delete',
|
||||
path,
|
||||
self.remote,
|
||||
exception=None,
|
||||
logger=self.logger)
|
||||
|
Loading…
Reference in New Issue
Block a user