mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 14:30:30 +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`
 | 
			
		||||
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"
 | 
			
		||||
    SH_FILES="hooks/pre-commit"
 | 
			
		||||
    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 requests
 | 
			
		||||
import subprocess
 | 
			
		||||
from bs4 import BeautifulSoup
 | 
			
		||||
from colorama import Fore, Style
 | 
			
		||||
from distutils.version import LooseVersion
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -15,9 +14,9 @@ checksums = None
 | 
			
		|||
versions = dict()
 | 
			
		||||
 | 
			
		||||
while not checksums:
 | 
			
		||||
   r = requests.get('https://gitlab.com/fdroid/gradle-transparency-log/-/raw/master/checksums.json')
 | 
			
		||||
   if r.status_code == 200:
 | 
			
		||||
       checksums = r.json()
 | 
			
		||||
    r = requests.get('https://gitlab.com/fdroid/gradle-transparency-log/-/raw/master/checksums.json')
 | 
			
		||||
    if r.status_code == 200:
 | 
			
		||||
        checksums = r.json()
 | 
			
		||||
 | 
			
		||||
gradle_bin_pat = re.compile(r'gradle-([0-9][0-9.]+[0-9])-bin.zip')
 | 
			
		||||
for url, d in checksums.items():
 | 
			
		||||
| 
						 | 
				
			
			@ -94,8 +93,7 @@ if os.getenv('CI_PROJECT_NAMESPACE') != 'fdroid-bot':
 | 
			
		|||
 | 
			
		||||
git_repo = git.repo.Repo('.')
 | 
			
		||||
modified = git_repo.git().ls_files(modified=True).split()
 | 
			
		||||
if (git_repo.is_dirty()
 | 
			
		||||
    and ('gradlew-fdroid' in modified or 'makebuildserver' in modified)):
 | 
			
		||||
if git_repo.is_dirty() and ('gradlew-fdroid' in modified or 'makebuildserver' in modified):
 | 
			
		||||
    branch = git_repo.create_head(os.path.basename(__file__), force=True)
 | 
			
		||||
    branch.checkout()
 | 
			
		||||
    git_repo.index.add(['gradlew-fdroid', 'makebuildserver'])
 | 
			
		||||
| 
						 | 
				
			
			@ -118,7 +116,7 @@ if (git_repo.is_dirty()
 | 
			
		|||
        print(Fore.RED
 | 
			
		||||
              + 'ERROR: GitLab Token not found in PERSONAL_ACCESS_TOKEN!'
 | 
			
		||||
              + Style.RESET_ALL)
 | 
			
		||||
        sys.exit(1)
 | 
			
		||||
        exit(1)
 | 
			
		||||
    gl = gitlab.Gitlab(os.getenv('CI_SERVER_URL'), api_version=4,
 | 
			
		||||
                       private_token=private_token)
 | 
			
		||||
    project = gl.projects.get(project_path, lazy=True)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue