1
0
mirror of https://github.com/lutris/lutris synced 2024-07-08 19:45:47 +00:00
lutris/Makefile

130 lines
3.0 KiB
Makefile
Raw Normal View History

VERSION=`grep "__version__" lutris/__init__.py | cut -d" " -f 3 | sed 's|"\(.*\)"|\1|'`
GITBRANCH ?= master
# Default GPG key ID to use for package signing.
PPA_GPG_KEY_ID ?= 82D96E430A1F1C0F0502747E37B90EDD4E3EFAE4
PYTHON:=$(shell which python3)
PIP:=$(PYTHON) -m pip
2014-02-08 18:21:00 +00:00
all:
export GITBRANCH=master
debuild
debclean
2013-06-26 10:11:21 +00:00
# The same as all, but requires two environment variables related to
# package signing.
# PPA_GPG_KEY_ID
# Key ID used to sign the .deb package files.
# PPA_GPG_PASSPHRASE
# Decrypts the private key associated with GPG_KEY_ID.
#
# When running from a GitHub workflow. The above environment variables
# are passed in from .github/scripts/build-sign-ubuntu.sh and that script
# receives those variables from the .github/workflows/publish-lutris-ppa.yml
# which receives them from the repository secrets.
github-ppa:
export GITBRANCH=master
# Automating builds for different Ubuntu codenames manipulates the
# version string, and so that lintian check is suppressed. Also note
# that all parameters after "--lintian-opts" are passed to lintian
# so that _must_ be the last parameter.
echo "y" | debuild -S -sa \
-k"${PPA_GPG_KEY_ID}" \
-p"gpg --batch --passphrase "${PPA_GPG_PASSPHRASE}" --pinentry-mode loopback" \
--lintian-opts --suppress-tags malformed-debian-changelog-version
debclean
build:
2018-07-29 22:01:51 +00:00
gbp buildpackage --git-debian-branch=${GITBRANCH}
2013-06-26 12:17:43 +00:00
clean:
debclean
2013-06-29 16:49:29 +00:00
build-source: clean
gbp buildpackage -S --git-debian-branch=${GITBRANCH}
mkdir build
mv ../lutris_${VERSION}* build
release: build-source upload upload-ppa
test:
rm tests/fixtures/pga.db -f
2021-12-14 04:13:46 +00:00
nose2
2013-06-29 16:49:29 +00:00
cover:
rm tests/fixtures/pga.db -f
rm tests/coverage/ -rf
2021-12-14 04:13:46 +00:00
nose2 --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage
2017-01-14 19:45:59 +00:00
pgp-renew:
osc signkey --extend home:strycore
osc rebuildpac home:strycore --all
2017-03-24 22:35:51 +00:00
changelog-add:
2020-07-18 22:50:28 +00:00
EDITOR=vim dch -i
changelog-edit:
2020-07-18 22:50:28 +00:00
EDITOR=vim dch -e
upload:
2020-07-04 18:37:40 +00:00
scp build/lutris_${VERSION}.tar.xz anaheim:~/volumes/releases/
2019-04-04 10:22:52 +00:00
upload-ppa:
dput ppa:lutris-team/lutris build/lutris_${VERSION}*_source.changes
2019-04-04 10:42:30 +00:00
upload-staging:
dput --force ppa:lutris-team/lutris-staging build/lutris_${VERSION}*_source.changes
snap:
snapcraft clean lutris -s pull
snapcraft
dev:
2022-05-24 03:57:20 +00:00
pip3 install isort flake8 pylint autopep8 pytest
# ============
# Style checks
# ============
style: isort autopep8 ## Format code
isort:
2022-05-24 02:35:17 +00:00
isort lutris
autopep8:
2022-05-24 02:35:17 +00:00
autopep8 --in-place --recursive --ignore E402 setup.py lutris
# ===============
# Static analysis
# ===============
check: isort-check flake8 pylint
isort-check:
2022-05-24 02:35:17 +00:00
isort lutris -c
flake8:
2022-05-24 02:35:17 +00:00
flake8 . --count --max-complexity=25 --max-line-length=120 --show-source --statistics
pylint:
2022-05-24 02:35:17 +00:00
pylint lutris --rcfile=.pylintrc --output-format=colorized
bandit:
2022-05-24 02:35:17 +00:00
bandit . --recursive --skip B101,B105,B107,B108,B303,B310,B311,B314,B320,B404,B405,B410,B602,B603,B607,B608
black:
2022-05-24 02:35:17 +00:00
black . --check
mypy:
2022-05-24 02:35:17 +00:00
mypy . --ignore-missing-imports --install-types --non-interactive
# =============
# Abbreviations
# =============
sc: style check
2020-04-26 16:37:06 +00:00
styles: style
checks: check