diff --git a/app/blueprints/packages/releases.py b/app/blueprints/packages/releases.py index 65e678a..db8dd55 100644 --- a/app/blueprints/packages/releases.py +++ b/app/blueprints/packages/releases.py @@ -45,7 +45,7 @@ def get_mt_releases(is_max): class CreatePackageReleaseForm(FlaskForm): title = StringField("Title", [InputRequired(), Length(1, 30)]) uploadOpt = RadioField ("Method", choices=[("upload", "File Upload")], default="upload") - vcsLabel = StringField("VCS Commit Hash, Branch, or Tag", default="master") + vcsLabel = StringField("Git reference (ie: commit hash, branch, or tag)", default=None) fileUpload = FileField("File Upload") min_rel = QuerySelectField("Minimum Minetest Version", [InputRequired()], query_factory=lambda: get_mt_releases(False), get_pk=lambda a: a.id, get_label=lambda a: a.name) @@ -74,7 +74,7 @@ def create_release(package): # Initial form class from post data and default data form = CreatePackageReleaseForm() if package.repo is not None: - form["uploadOpt"].choices = [("vcs", "From Git Commit or Branch"), ("upload", "File Upload")] + form["uploadOpt"].choices = [("vcs", "Import from Git"), ("upload", "Upload .zip file")] if request.method != "POST": form["uploadOpt"].data = "vcs" diff --git a/app/templates/packages/release_edit.html b/app/templates/packages/release_edit.html index a0070eb..7340ec6 100644 --- a/app/templates/packages/release_edit.html +++ b/app/templates/packages/release_edit.html @@ -41,6 +41,8 @@ {% endif %} {% endif %} +

Supported Minetest versions

+
{{ render_field(form.min_rel, class_="col-sm-6") }} {{ render_field(form.max_rel, class_="col-sm-6") }} @@ -51,14 +53,19 @@

- Note: Min and max versions will be used to hide the package on - platforms not within the range. - You cannot select the oldest version for min or the newest version - for max as this does not make sense - you can't predict the future.
+ Set the minimum and maximum Minetest versions supported. + This release will be hidden to clients outside of that range.
Leave both as None if in doubt. + You can set this automatically in the .conf of your package. +

+

+ You cannot select the oldest version for min or the newest version + for max as this does not make sense - you can't predict the future.

- {{ render_submit_field(form.submit) }} +

+ {{ render_submit_field(form.submit) }} +

{{ _("Delete Release") }}

diff --git a/app/templates/packages/release_new.html b/app/templates/packages/release_new.html index 9a95530..4dd2db2 100644 --- a/app/templates/packages/release_new.html +++ b/app/templates/packages/release_new.html @@ -11,11 +11,11 @@ {{ _("Setup webhook") }} - {{ _("Set up a webhook on GitHub to create releases automatically.") }} + {{ _("Create releases automatically when you push commits or tags to GitHub, using a webhook or the API.") }} {% elif package.repo %} - {{ _("You can create releases automatically when you push commits or tags to your repository.") }} + {{ _("You can create releases automatically when you push commits or tags to your repository, using a webhook or the API.") }} {% else %} @@ -27,16 +27,28 @@
{{ form.hidden_tag() }} +

1. Name release

+ {{ render_field(form.title, placeholder="Human readable. Eg: 1.0.0 or 2018-05-28") }} + +

2. Set the content

+

Method

{{ render_radio_field(form.uploadOpt) }} {% if package.repo %} - {{ render_field(form.vcsLabel, class_="mt-3") }} + {{ render_field(form.vcsLabel, placeholder="Leave blank to use default branch", class_="mt-3") }} {% endif %} {{ render_field(form.fileUpload, fieldclass="form-control-file", class_="mt-3", accept=".zip") }} +

+ Take a look at the Package Configuration and Releases Guide for + tips on customising releases. +

+ +

3. Supported Minetest versions

+
{{ render_field(form.min_rel, class_="col-sm-6") }} {{ render_field(form.max_rel, class_="col-sm-6") }} @@ -47,15 +59,21 @@

- Note: Min and max versions will be used to hide the package on - platforms not within the range. - You cannot select the oldest version for min or the newest version - for max as this does not make sense - you can't predict the future.
+ Set the minimum and maximum Minetest versions supported. + This release will be hidden to clients outside of that range.
Leave both as None if in doubt. + You can set this automatically in the .conf of your package. +

+

+ You cannot select the oldest version for min or the newest version + for max as this does not make sense - you can't predict the future.

- {{ render_submit_field(form.submit) }} +

+ {{ render_submit_field(form.submit) }} +

+ {% endblock %} {% block scriptextra %}