mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Add warnings for repo clonings in build recipes
This commit is contained in:
parent
67cbd1fba4
commit
9198cd4127
@ -224,15 +224,22 @@ def main():
|
|||||||
|
|
||||||
# Build warnings
|
# Build warnings
|
||||||
for build in app['builds']:
|
for build in app['builds']:
|
||||||
for n in ['master', 'origin/', 'default', 'trunk']:
|
for s in ['master', 'origin/', 'default', 'trunk']:
|
||||||
if build['commit'] and build['commit'].startswith(n):
|
if build['commit'] and build['commit'].startswith(s):
|
||||||
warn("Branch '%s' used as commit in build '%s'" % (
|
warn("Branch '%s' used as commit in build '%s'" % (
|
||||||
n, build['version']))
|
s, build['version']))
|
||||||
for srclib in build['srclibs']:
|
for srclib in build['srclibs']:
|
||||||
ref = srclib.split('@')[1].split('/')[0]
|
ref = srclib.split('@')[1].split('/')[0]
|
||||||
if ref.startswith(n):
|
if ref.startswith(s):
|
||||||
warn("Branch '%s' used as commit in srclib '%s'" % (
|
warn("Branch '%s' used as commit in srclib '%s'" % (
|
||||||
n, srclib))
|
s, srclib))
|
||||||
|
for s in ['git clone', 'svn checkout', 'svn co', 'hg clone']:
|
||||||
|
for flag in ['init', 'prebuild', 'build']:
|
||||||
|
if not build[flag]:
|
||||||
|
continue
|
||||||
|
if s in build[flag]:
|
||||||
|
# TODO: This should not be pedantic!
|
||||||
|
pwarn("'%s' used in %s '%s'" % (s, flag, build[flag]))
|
||||||
|
|
||||||
if not appid:
|
if not appid:
|
||||||
print
|
print
|
||||||
|
Loading…
Reference in New Issue
Block a user