2018-11-07 10:48:57 +00:00
|
|
|
VERSION=`grep "__version__" lutris/__init__.py | cut -d" " -f 3 | sed 's|"\(.*\)"|\1|'`
|
2020-04-15 01:50:20 +00:00
|
|
|
GITBRANCH ?= master
|
2022-12-12 02:59:00 +00:00
|
|
|
# Default GPG key ID to use for package signing.
|
|
|
|
PPA_GPG_KEY_ID ?= 82D96E430A1F1C0F0502747E37B90EDD4E3EFAE4
|
2020-04-26 12:12:50 +00:00
|
|
|
PYTHON:=$(shell which python3)
|
|
|
|
PIP:=$(PYTHON) -m pip
|
2014-02-08 18:21:00 +00:00
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
all:
|
|
|
|
export GITBRANCH=master
|
|
|
|
debuild
|
|
|
|
debclean
|
2013-06-26 10:11:21 +00:00
|
|
|
|
2023-02-05 19:24:34 +00:00
|
|
|
|
|
|
|
unsigned:
|
|
|
|
export GITBRANCH=master
|
|
|
|
debuild -i -us -uc -b
|
|
|
|
debclean
|
|
|
|
|
|
|
|
|
2022-12-13 06:16:04 +00:00
|
|
|
# Build process for GitHub runners.
|
|
|
|
# Requires two environment variables related to package signing.
|
2022-12-12 02:59:00 +00:00
|
|
|
# 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
|
2022-12-13 06:16:04 +00:00
|
|
|
# are passed in from .github/scripts/build-ubuntu.sh and that script
|
2022-12-12 02:59:00 +00:00
|
|
|
# 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.
|
2022-12-13 06:16:04 +00:00
|
|
|
echo "y" | debuild -S \
|
2022-12-12 02:59:00 +00:00
|
|
|
-k"${PPA_GPG_KEY_ID}" \
|
2023-05-16 20:12:20 +00:00
|
|
|
-p"gpg --batch --passphrase ${PPA_GPG_PASSPHRASE} --pinentry-mode loopback" \
|
2022-12-12 02:59:00 +00:00
|
|
|
--lintian-opts --suppress-tags malformed-debian-changelog-version
|
|
|
|
|
2023-05-12 02:38:09 +00:00
|
|
|
build-deps-ubuntu:
|
|
|
|
sudo apt install devscripts debhelper dh-python meson
|
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
build:
|
2018-07-29 22:01:51 +00:00
|
|
|
gbp buildpackage --git-debian-branch=${GITBRANCH}
|
2013-06-26 12:08:49 +00:00
|
|
|
|
2013-06-26 12:17:43 +00:00
|
|
|
clean:
|
|
|
|
debclean
|
2013-06-29 16:49:29 +00:00
|
|
|
|
2020-04-15 01:50:20 +00:00
|
|
|
build-source: clean
|
|
|
|
gbp buildpackage -S --git-debian-branch=${GITBRANCH}
|
|
|
|
mkdir build
|
|
|
|
mv ../lutris_${VERSION}* build
|
|
|
|
|
|
|
|
release: build-source upload upload-ppa
|
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
test:
|
|
|
|
rm tests/fixtures/pga.db -f
|
2021-12-14 04:13:46 +00:00
|
|
|
nose2
|
2013-06-29 16:49:29 +00:00
|
|
|
|
|
|
|
|
2019-12-27 14:19:55 +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
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
changelog-add:
|
2020-07-18 22:50:28 +00:00
|
|
|
EDITOR=vim dch -i
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
changelog-edit:
|
2020-07-18 22:50:28 +00:00
|
|
|
EDITOR=vim dch -e
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2019-07-10 02:20:56 +00:00
|
|
|
upload-ppa:
|
|
|
|
dput ppa:lutris-team/lutris build/lutris_${VERSION}*_source.changes
|
|
|
|
|
2019-04-04 10:42:30 +00:00
|
|
|
upload-staging:
|
2019-04-04 22:11:35 +00:00
|
|
|
dput --force ppa:lutris-team/lutris-staging build/lutris_${VERSION}*_source.changes
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
snap:
|
|
|
|
snapcraft clean lutris -s pull
|
|
|
|
snapcraft
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
dev:
|
2024-01-08 04:33:04 +00:00
|
|
|
pip3 install isort flake8 pylint autopep8 pytest mypy mypy-baseline nose2
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
# ============
|
|
|
|
# Style checks
|
|
|
|
# ============
|
|
|
|
|
2020-05-06 19:55:58 +00:00
|
|
|
style: isort autopep8 ## Format code
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
isort:
|
2022-05-24 02:35:17 +00:00
|
|
|
isort lutris
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
autopep8:
|
2022-05-24 02:35:17 +00:00
|
|
|
autopep8 --in-place --recursive --ignore E402 setup.py lutris
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ===============
|
|
|
|
# Static analysis
|
|
|
|
# ===============
|
|
|
|
|
2023-08-26 08:07:48 +00:00
|
|
|
check: isort-check flake8 pylint mypy
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
isort-check:
|
2022-05-24 02:35:17 +00:00
|
|
|
isort lutris -c
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
flake8:
|
2022-05-24 02:35:17 +00:00
|
|
|
flake8 . --count --max-complexity=25 --max-line-length=120 --show-source --statistics
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
pylint:
|
2022-05-24 02:35:17 +00:00
|
|
|
pylint lutris --rcfile=.pylintrc --output-format=colorized
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
|
|
|
|
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
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
|
|
|
|
black:
|
2022-05-24 02:35:17 +00:00
|
|
|
black . --check
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
|
|
|
|
mypy:
|
2023-05-31 04:30:25 +00:00
|
|
|
mypy . --install-types --non-interactive 2>&1 | mypy-baseline filter
|
|
|
|
|
|
|
|
mypy-reset-baseline: # Add new typing errors to mypy. Use sparingly.
|
|
|
|
mypy . --install-types --non-interactive 2>&1 | mypy-baseline sync
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
# =============
|
|
|
|
# Abbreviations
|
|
|
|
# =============
|
|
|
|
|
|
|
|
sc: style check
|
2020-04-26 16:37:06 +00:00
|
|
|
styles: style
|
|
|
|
checks: check
|