1 Star 1 Fork 0

smooth/avocado

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile.gh 2.90 KB
一键复制 编辑 原始数据 按行查看 历史
# This Makefile contains targets used by GitHub Actions
include Makefile.include
ifndef AVOCADO_OPTIONAL_PLUGINS
AVOCADO_OPTIONAL_PLUGINS=$(shell find ./optional_plugins -maxdepth 1 -mindepth 1 -type d)
endif
ifndef DEVEL_NAME
DEVEL_NAME=$(shell git config --get user.name)
endif
ifndef DEVEL_MAIL
DEVEL_NAME=$(shell git config --get user.email)
endif
all:
@echo
@echo "This file contains targets used by GitHub Actions."
@echo
codespell:
pip install codespell==2.2.4
codespell --check-filenames --check-hidden --skip ".git,*.js,./selftests/unit/utils/cpu.py.data/*,./avocado/utils/pmem.py,./avocado/utils/cpu.py,./avocado/utils/linux_modules.py,./selftests/functional/output.py,./selftests/unit/utils/vmimage.py"
bandit:
pip install bandit
bandit -o bandit-output.txt -r --skip B101,B105,B311,B404,B603 .
propagate-version:
echo "$(VERSION)" > VERSION
for DIR in $(AVOCADO_OPTIONAL_PLUGINS); do\
if test -f "$$DIR/VERSION"; then\
echo ">> Updating $$DIR"; echo "$(VERSION)" > "$$DIR/VERSION";\
else echo ">> Skipping $$DIR"; fi;\
done
release-update-spec:
rpmdev-bumpspec -n "$(VERSION)" -u "$(DEVEL_NAME) <$(DEVEL_MAIL)>" -c "New release" python-avocado.spec
sed -i 's/^Release:.*/Release: 1%{?gitrel}%{?dist}/' python-avocado.spec
release-commit-tag:
git commit -m "Changes for release $(VERSION)" -a
git tag "$(VERSION)" -m "Release $(VERSION)"
build-update-readthedocs:
ifndef TOKEN_RTD
$(error TOKEN_RTD is undefined)
endif
ifndef URL
$(error URL is undefined)
endif
# Activate version
curl -X PATCH \
-H "Authorization: Token $(TOKEN_RTD)" "$(URL)/versions/$(VERSION)/" \
-H "Content-Type: application/json" -d '{"active": true, "hidden": false }'
# Build new version
curl -X POST \
-H "Authorization: Token $(TOKEN_RTD)" "$(URL)/versions/$(VERSION)/builds/"
build-wheel: pip
$(PYTHON) -m pip install $(PYTHON_DEVELOP_ARGS) build
if test ! -d PYPI_UPLOAD; then mkdir PYPI_UPLOAD; fi
$(PYTHON) -m build -o PYPI_UPLOAD
for PLUGIN in $(AVOCADO_OPTIONAL_PLUGINS); do\
if test -f $$PLUGIN/setup.py; then\
cd $$PLUGIN;\
$(PYTHON) -m build -o ../../PYPI_UPLOAD;\
cd -;\
fi;\
done
check-wheel: build-wheel
$(PYTHON) -m pip install twine
twine check --strict ./PYPI_UPLOAD/*
build-egg:
if test ! -d EGG_UPLOAD; then mkdir EGG_UPLOAD; fi
$(PYTHON) setup.py bdist_egg -d EGG_UPLOAD
for PLUGIN in $(AVOCADO_OPTIONAL_PLUGINS); do\
if test -f $$PLUGIN/setup.py; then\
cd $$PLUGIN;\
$(PYTHON) setup.py bdist_egg -d ../../EGG_UPLOAD;\
cd -;\
fi;\
done
update-pypi:
ifndef TWINE_USERNAME
$(error TWINE_USERNAME is undefined)
endif
ifndef TWINE_PASSWORD
$(error TWINE_PASSWORD is undefined)
endif
pip install twine
export TWINE_NON_INTERACTIVE=true
twine upload PYPI_UPLOAD/*.{tar.gz,whl}
variables:
@echo "PYTHON: $(PYTHON)"
@echo "VERSION: $(VERSION)"
@echo "AVOCADO_OPTIONAL_PLUGINS: $(AVOCADO_OPTIONAL_PLUGINS)"
@echo "DEVEL_NAME: $(DEVEL_NAME)"
@echo "DEVEL_MAIL: $(DEVEL_MAIL)"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/smooth00/avocado.git
git@gitee.com:smooth00/avocado.git
smooth00
avocado
avocado
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385