1 Star 0 Fork 3

wenjia/talebook

forked from zl无悔青春/talebook 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
.PHONY: all build push test
VER := $(shell git branch --show-current)
IMAGE := talebook/talebook:$(VER)
REPO1 := talebook/talebook:latest
REPO2 := talebook/calibre-webserver:latest
all: build up
build: test
docker build --no-cache=false --build-arg BUILD_COUNTRY=CN --build-arg GIT_VERSION=$(VER) \
-f Dockerfile -t $(IMAGE) -t $(REPO1) -t $(REPO2) .
push:
docker push $(IMAGE)
docker push $(REPO1)
docker push $(REPO2)
test: lint
rm -f unittest.log
docker build --build-arg BUILD_COUNTRY=CN -t talebook/test --target test -f Dockerfile .
docker run --rm --name=talebook-docker-test -v "$$PWD":"$$PWD" -w "$$PWD" talebook/test pytest --log-file=unittest.log --log-level=INFO tests
lint:
flake8 webserver --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 webserver --count --statistics --config .style.yapf
pytest: lint
pytest tests
testv:
coverage run -m unittest
coverage report --include "*talebook*"
testvv: testv
coverage html -d ".htmlcov" --include "*talebook*"
cd ".htmlcov" && python3 -m http.server 7777
up:
docker-compose up -d
down:
docker-compose stop
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wenjiaguo/talebook.git
git@gitee.com:wenjiaguo/talebook.git
wenjiaguo
talebook
talebook
master

搜索帮助