mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Remove already built disabled builds from repo
This commit is contained in:
parent
bbfb472fe5
commit
b321e26a65
1 changed files with 15 additions and 0 deletions
|
@ -235,6 +235,21 @@ def main():
|
||||||
else:
|
else:
|
||||||
apkcache = {}
|
apkcache = {}
|
||||||
cachechanged = False
|
cachechanged = False
|
||||||
|
|
||||||
|
# Check repo directory for disabled builds and remove them...
|
||||||
|
for app in apps:
|
||||||
|
for build in app['builds']:
|
||||||
|
if build['commit'].startswith('!'):
|
||||||
|
apkfilename = app['id'] + '_' + str(build['vercode']) + '.apk'
|
||||||
|
apkpath = os.path.join('repo', apkfilename)
|
||||||
|
srcpath = apkfilename[:-4] + "_src.tar.gz"
|
||||||
|
for name in [apkpath, srcpath]:
|
||||||
|
if os.path.exists(name):
|
||||||
|
print "Deleting disabled build output " + apkfilename
|
||||||
|
os.remove(name)
|
||||||
|
if apkcache.has_key(apkfilename):
|
||||||
|
del apkcache[apkfilename]
|
||||||
|
|
||||||
apks = []
|
apks = []
|
||||||
for apkfile in glob.glob(os.path.join('repo','*.apk')):
|
for apkfile in glob.glob(os.path.join('repo','*.apk')):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue