mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
enable complete lint/CI checking on gradle-release-checksums.py
This commit is contained in:
parent
2efab0f8ec
commit
669ce10d9a
2 changed files with 6 additions and 8 deletions
|
@ -8,7 +8,7 @@ exec 1>&2
|
||||||
|
|
||||||
files=`git diff-index --cached HEAD 2>&1 | sed 's/^:.* //' | uniq | cut -b100-500`
|
files=`git diff-index --cached HEAD 2>&1 | sed 's/^:.* //' | uniq | cut -b100-500`
|
||||||
if [ -z "$files" ]; then
|
if [ -z "$files" ]; then
|
||||||
PY_FILES="fdroid makebuildserver setup.py fdroidserver/*.py examples/*.py"
|
PY_FILES="fdroid makebuildserver setup.py fdroidserver/*.py examples/*.py tests/gradle-release-checksums.py"
|
||||||
PY_TEST_FILES="tests/*.TestCase"
|
PY_TEST_FILES="tests/*.TestCase"
|
||||||
SH_FILES="hooks/pre-commit"
|
SH_FILES="hooks/pre-commit"
|
||||||
BASH_FILES="gradlew-fdroid jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*"
|
BASH_FILES="gradlew-fdroid jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*"
|
||||||
|
|
|
@ -6,7 +6,6 @@ import os
|
||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
import subprocess
|
import subprocess
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from colorama import Fore, Style
|
from colorama import Fore, Style
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
|
@ -94,8 +93,7 @@ if os.getenv('CI_PROJECT_NAMESPACE') != 'fdroid-bot':
|
||||||
|
|
||||||
git_repo = git.repo.Repo('.')
|
git_repo = git.repo.Repo('.')
|
||||||
modified = git_repo.git().ls_files(modified=True).split()
|
modified = git_repo.git().ls_files(modified=True).split()
|
||||||
if (git_repo.is_dirty()
|
if git_repo.is_dirty() and ('gradlew-fdroid' in modified or 'makebuildserver' in modified):
|
||||||
and ('gradlew-fdroid' in modified or 'makebuildserver' in modified)):
|
|
||||||
branch = git_repo.create_head(os.path.basename(__file__), force=True)
|
branch = git_repo.create_head(os.path.basename(__file__), force=True)
|
||||||
branch.checkout()
|
branch.checkout()
|
||||||
git_repo.index.add(['gradlew-fdroid', 'makebuildserver'])
|
git_repo.index.add(['gradlew-fdroid', 'makebuildserver'])
|
||||||
|
@ -118,7 +116,7 @@ if (git_repo.is_dirty()
|
||||||
print(Fore.RED
|
print(Fore.RED
|
||||||
+ 'ERROR: GitLab Token not found in PERSONAL_ACCESS_TOKEN!'
|
+ 'ERROR: GitLab Token not found in PERSONAL_ACCESS_TOKEN!'
|
||||||
+ Style.RESET_ALL)
|
+ Style.RESET_ALL)
|
||||||
sys.exit(1)
|
exit(1)
|
||||||
gl = gitlab.Gitlab(os.getenv('CI_SERVER_URL'), api_version=4,
|
gl = gitlab.Gitlab(os.getenv('CI_SERVER_URL'), api_version=4,
|
||||||
private_token=private_token)
|
private_token=private_token)
|
||||||
project = gl.projects.get(project_path, lazy=True)
|
project = gl.projects.get(project_path, lazy=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue