Skip to content

Commit

Permalink
appgenerator: misc fixes (#2254)
Browse files Browse the repository at this point in the history
* appgenerator: docs -> doc

* appgenerator: remove stuff related to DISCLAIMER.md which is not used in packaging v2 anymore
  • Loading branch information
alexAubin authored Apr 23, 2024
1 parent c52b2aa commit 1599c77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
25 changes: 6 additions & 19 deletions tools/app_generator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,6 @@ class Documentation(FlaskForm):
"spellcheck": "false",
},
)
disclaimer = TextAreaField(
lazy_gettext(
"Type the DISCLAIMER.md file content, which list warnings and attention points."
),
validators=[Optional()],
render_kw={
"class": "form-control",
"spellcheck": "false",
},
)
pre_install = TextAreaField(
lazy_gettext("Type the PRE_INSTALL.md file content"),
validators=[Optional()],
Expand Down Expand Up @@ -751,25 +741,22 @@ def __init__(self, id_, destination_path=None):
# app_files.append(AppFile("php", "conf/extra_php-fpm.conf"))

if main_form.description.data:
app_files.append(AppFile("DESCRIPTION", "docs/DESCRIPTION.md"))

if main_form.disclaimer.data:
app_files.append(AppFile("DISCLAIMER", "docs/DISCLAIMER.md"))
app_files.append(AppFile("DESCRIPTION", "doc/DESCRIPTION.md"))

if main_form.pre_install.data:
app_files.append(AppFile("PRE_INSTALL", "docs/PRE_INSTALL.md"))
app_files.append(AppFile("PRE_INSTALL", "doc/PRE_INSTALL.md"))

if main_form.post_install.data:
app_files.append(AppFile("POST_INSTALL", "docs/POST_INSTALL.md"))
app_files.append(AppFile("POST_INSTALL", "doc/POST_INSTALL.md"))

if main_form.pre_upgrade.data:
app_files.append(AppFile("PRE_UPGRADE", "docs/PRE_UPGRADE.md"))
app_files.append(AppFile("PRE_UPGRADE", "doc/PRE_UPGRADE.md"))

if main_form.post_upgrade.data:
app_files.append(AppFile("POST_UPGRADE", "docs/POST_UPGRADE.md"))
app_files.append(AppFile("POST_UPGRADE", "doc/POST_UPGRADE.md"))

if main_form.admin.data:
app_files.append(AppFile("ADMIN", "docs/ADMIN.md"))
app_files.append(AppFile("ADMIN", "doc/ADMIN.md"))

template_dir = os.path.dirname(__file__) + "/templates/"
for app_file in app_files:
Expand Down
1 change: 0 additions & 1 deletion tools/app_generator/templates/DISCLAIMER.j2

This file was deleted.

1 change: 0 additions & 1 deletion tools/app_generator/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ <h2 class="panel-title collapse-title">{{ gettext("8/9 - General and advanced do
<div class="panel-body collapsible collapsed">
<p><i>{{ gettext("A more complete presentation that the summary completed above, explaining to what correspond the software, the eventual warnings and specific details on its functioning in Yunohost (it's the place where one can warn about integration issues).") }}</i></p>
{{ form_field(main_form.description) }}
{{ form_field(main_form.disclaimer) }}

<p><i>{{ gettext("Indications to show at key steps to manage the package : installation, update, message to the admin account. You usually don't have to fill them.") }}</i></p>
{{ form_field(main_form.pre_install) }}
Expand Down

0 comments on commit 1599c77

Please sign in to comment.