mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-05-17 03:09:11 +00:00
gitlab-ci: fix broken logic for running publish when signatures are there
!8834
92f77359dd
This commit is contained in:
parent
29db88b161
commit
52b802517f
2 changed files with 17 additions and 3 deletions
|
|
@ -243,7 +243,9 @@ fdroid build:
|
|||
chown -R vagrant $VAGRANT_HOME;
|
||||
$fdroid fetchsrclibs $build --verbose;
|
||||
$fdroid build --verbose --test --scan-binary --on-server --no-tarball $build;
|
||||
./tools/should-run-publish.py $build && (apt-get install sudo; $fdroid publish --verbose $build);
|
||||
./tools/build-contains-signatures.py $build || continue;
|
||||
apt-get install sudo;
|
||||
$fdroid publish --verbose $build;
|
||||
done
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,17 +8,29 @@ import yaml
|
|||
from colorama import Fore, Style
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print(Fore.RED + ('ERROR: incorrect number of arguments') + Style.RESET_ALL)
|
||||
print(
|
||||
Fore.RED
|
||||
+ ('ERROR: incorrect number of arguments: ' + ' '.join(sys.argv[1:]))
|
||||
+ Style.RESET_ALL
|
||||
)
|
||||
exit(1)
|
||||
|
||||
appid, versionCode = sys.argv[1].split(':')
|
||||
|
||||
if not glob.glob('metadata/%s/signatures/%s/*' % (appid, versionCode)):
|
||||
print(Fore.RED + ('ERROR: no signatures found') + Style.RESET_ALL)
|
||||
print('no signatures found, skipping publish')
|
||||
exit(1)
|
||||
|
||||
for f in glob.glob('tmp/%s_%s.apk' % (appid, versionCode)):
|
||||
os.rename(f, f.replace('tmp/', 'unsigned/'))
|
||||
|
||||
if not glob.glob('unsigned/%s_%s.apk' % (appid, versionCode)):
|
||||
print('no unsigned APK found, skipping publish')
|
||||
exit(1)
|
||||
|
||||
|
||||
print(
|
||||
Fore.GREEN
|
||||
+ ('Found signatures for %s, running publish...' % sys.argv[1])
|
||||
+ Style.RESET_ALL
|
||||
)
|
||||
Loading…
Reference in a new issue