mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Report an error if config panel is set to 1.0 but the config script is still using some super old stuff...
This commit is contained in:
parent
1721516624
commit
24e9c9574a
1 changed files with 9 additions and 4 deletions
|
@ -548,10 +548,15 @@ class App(TestSuite):
|
|||
"JSON config panels are not supported anymore, should be replaced by a toml version"
|
||||
)
|
||||
|
||||
if file_exists(app.path + "config_panel.toml") and os.system("grep -q 'version = \"0.1\"' '%s'" % (app.path + "config_panel.toml")) == 0:
|
||||
yield Warning(
|
||||
"Config panels version 0.1 are not supported anymore, should be adapted for version 1.0"
|
||||
)
|
||||
if file_exists(app.path + "config_panel.toml"):
|
||||
if os.system("grep -q 'version = \"0.1\"' '%s'" % (app.path + "config_panel.toml")) == 0:
|
||||
yield Warning(
|
||||
"Config panels version 0.1 are not supported anymore, should be adapted for version 1.0"
|
||||
)
|
||||
elif os.path.exists(app.path + "/scripts/config") and os.system("grep -q 'YNH_CONFIG_\\|yunohost app action' '%s'" % (app.path + "/scripts/config")) == 0:
|
||||
yield Error(
|
||||
"The config panel is set to version 1.x, but the config script is apparently still using some old code from 0.1 such as '$YNH_CONFIG_STUFF' or 'yunohost app action'"
|
||||
)
|
||||
|
||||
@test()
|
||||
def badges_in_readme(app):
|
||||
|
|
Loading…
Reference in a new issue