dirty
This commit is contained in:
parent
95e6ee35ed
commit
9de1a7db79
20 changed files with 180 additions and 110 deletions
71
Makefile
71
Makefile
|
|
@ -1,31 +1,62 @@
|
|||
.PHONY: requirements.txt requirements-dev.txt configure Pipfile.lock src/sphinx_theme_ref/assets build
|
||||
WEB2_PACKAGE_ID := html-theme-web2-1.0.0
|
||||
WEB2_PACKAGE_URL := https://bitbucket.org/byteb4rb1e/html-theme-web2/downloads/$(WEB2_PACKAGE_ID).tar.gz
|
||||
PYPKG_DIR := src/byteb4rb1e/sphinxcontrib/theme/web2
|
||||
WITH_GPG = $(shell command -v gpg && echo yes)
|
||||
|
||||
PKG_BASENAME := sphinx_theme_ref
|
||||
PYTHON3=$(if $(wildcard .venv/.*),.venv/bin/python3,python3)
|
||||
|
||||
VENDOR_OUTPUT_PATH := $(shell realpath ./src/sphinx_theme_ref/assets)
|
||||
VERSION=$(shell $(PYTHON3) -m setuptools_scm)
|
||||
|
||||
Pipfile.lock:
|
||||
.venv/bin/pipenv lock
|
||||
.chore: requirements.txt requirements-dev.txt Pipfile.lock configure
|
||||
|
||||
requirements.txt:
|
||||
.venv/bin/pipenv requirements > requirements.txt
|
||||
|
||||
requirements-dev.txt:
|
||||
.venv/bin/pipenv requirements --dev-only > requirements-dev.txt
|
||||
.clean:
|
||||
rm -rvf dist/ build/
|
||||
|
||||
configure:
|
||||
autoconf
|
||||
|
||||
src/sphinx_theme_ref/assets:
|
||||
rm -r src/$(PKG_BASENAME)/assets
|
||||
make -C vendor/html-theme-ref build/production OUTPUT_PATH=$(VENDOR_OUTPUT_PATH)
|
||||
dist: src/
|
||||
$(PYTHON3) -m build
|
||||
|
||||
# user acceptance testing
|
||||
uat:
|
||||
trap 'kill 0' SIGINT; \
|
||||
make -C vendor/html-theme-ref watch OUTPUT_PATH=$(VENDOR_OUTPUT_PATH) & \
|
||||
wait
|
||||
Pipfile.lock:
|
||||
pipenv lock
|
||||
|
||||
build:
|
||||
.venv/bin/pipenv run build
|
||||
requirements.txt:
|
||||
$(PYTHON3) -m pipenv requirements > requirements.txt
|
||||
|
||||
requirements-dev.txt:
|
||||
$(PYTHON3) -m pipenv requirements --dev-only > requirements-dev.txt
|
||||
|
||||
src src/: $(PYPKG_DIR)/_static_extra.tar $(PYPKG_DIR)/_static_extra.tar.sha256
|
||||
|
||||
$(PYPKG_DIR)/_static_extra.tar: vendor/$(WEB2_PACKAGE_ID).tar
|
||||
cp -vf "$<" "$@"
|
||||
|
||||
$(PYPKG_DIR)/_static_extra.tar.sha256: vendor/$(WEB2_PACKAGE_ID).tar.sha256
|
||||
cp -vf "$<" "$@"
|
||||
|
||||
test-reports test-reports/: test-reports/unit test-reports/integration
|
||||
|
||||
test-reports/unit:
|
||||
$(PYTHON3) -m tox -m unit
|
||||
|
||||
test-reports/integration:
|
||||
$(PYTHON3) -m tox -m integration
|
||||
|
||||
test-reports/audit.json:
|
||||
$(PYTHON3) -m tox -m integration
|
||||
|
||||
vendor/$(WEB2_PACKAGE_ID).tar.gz: $(if $(WITH_GPG),vendor/$(WEB2_PACKAGE_ID).tar.gz.asc,)
|
||||
curl -L --fail --output "$@" "$(WEB2_PACKAGE_URL)"
|
||||
ifneq ($(WITH_GPG),)
|
||||
gpg --verify "$<" "$@"
|
||||
endif
|
||||
|
||||
vendor/$(WEB2_PACKAGE_ID).tar.gz.asc:
|
||||
curl -L --fail --output "$@" "$(WEB2_PACKAGE_URL).asc"
|
||||
|
||||
vendor/$(WEB2_PACKAGE_ID).tar: vendor/$(WEB2_PACKAGE_ID).tar.gz
|
||||
gzip --decompress --keep --stdout "$<" > $@
|
||||
|
||||
vendor/$(WEB2_PACKAGE_ID).tar.sha256:
|
||||
curl -L --fail --output "vendor/$(WEB2_PACKAGE_ID).tar.sha256" "$(patsubst %.gz,%.sha256,$(WEB2_PACKAGE_URL))"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue