2018-03-20 19:40:19 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2020-12-15 22:22:17 +01:00
|
|
|
{{ _("Create a release") }} - {{ package.title }}
|
2018-03-20 19:40:19 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-12-15 22:22:17 +01:00
|
|
|
<h1>{{ _("Create a release") }}</h1>
|
2020-01-25 02:29:55 +01:00
|
|
|
|
2020-12-15 23:04:19 +01:00
|
|
|
{% if package.update_config %}
|
|
|
|
<p class="alert alert-secondary mb-4">
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="float-end btn btn-sm btn-secondary" href="{{ package.get_url('packages.update_config') }}">{{ _("Settings") }}</a>
|
2021-01-29 23:20:44 +01:00
|
|
|
{% if package.update_config.make_release %}
|
|
|
|
{{ _("You have automatic releases enabled.") }}
|
|
|
|
{% else %}
|
|
|
|
{{ _("You have Git update notifications enabled.") }}
|
2021-01-30 16:09:31 +01:00
|
|
|
{{ _("You can enable automatic updates in the update settings.") }}
|
2021-01-29 23:20:44 +01:00
|
|
|
{% endif %}
|
2020-12-15 23:04:19 +01:00
|
|
|
</p>
|
|
|
|
{% else %}
|
2020-12-15 22:22:17 +01:00
|
|
|
<p class="alert alert-info mb-4">
|
|
|
|
{% if package.repo %}
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="float-end btn btn-sm btn-info" href="{{ package.get_url('packages.setup_releases') }}">{{ _("Set up") }}</a>
|
|
|
|
<i class="fas fa-info me-2"></i>
|
2020-01-25 02:29:55 +01:00
|
|
|
|
2020-12-15 22:22:17 +01:00
|
|
|
{{ _("You can create releases automatically when you push commits or tags to your repository.") }}
|
|
|
|
{% else %}
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="float-end btn btn-sm btn-info" href="{{ package.get_url('packages.create_edit') }}">{{ _("Add Git repo") }}</a>
|
|
|
|
<i class="fas fa-info me-2"></i>
|
2020-01-25 02:29:55 +01:00
|
|
|
|
2020-12-15 22:22:17 +01:00
|
|
|
{{ _("Using Git would allow you to create releases automatically when you push code or tags.") }}
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2020-01-25 02:29:55 +01:00
|
|
|
|
2018-12-22 23:29:30 +01:00
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_radio_field %}
|
2018-03-23 18:05:07 +01:00
|
|
|
<form method="POST" action="" enctype="multipart/form-data">
|
2018-03-20 19:40:19 +01:00
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3>{{ _("1. Name release") }}</h3>
|
2020-12-04 02:43:20 +01:00
|
|
|
|
2024-06-22 16:18:58 +02:00
|
|
|
{{ render_field(form.name, hint=_("Release short name. Eg: 1.0.0 or 2018-05-28")) }}
|
2024-06-22 16:24:40 +02:00
|
|
|
{{ render_field(form.title, placeholder=_("Same as name"), hint=_("Human-readable name. Eg: 1.0.0 - The Trains Update")) }}
|
2024-06-22 16:48:54 +02:00
|
|
|
{{ render_field(form.release_notes, fieldclass="form-control markdown") }}
|
2020-12-04 02:43:20 +01:00
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3 class="mt-5">{{ _("2. Set the content") }}</h3>
|
2020-12-04 02:43:20 +01:00
|
|
|
|
2024-06-22 16:18:58 +02:00
|
|
|
{{ render_radio_field(form.upload_mode) }}
|
2018-12-22 23:29:30 +01:00
|
|
|
|
2018-06-06 00:13:39 +02:00
|
|
|
{% if package.repo %}
|
2024-06-22 16:18:58 +02:00
|
|
|
{{ render_field(form.vcs_label, placeholder=_("Leave blank to use default branch"), class_="mt-3",
|
2020-12-05 23:29:37 +01:00
|
|
|
pattern="[A-Za-z0-9/._-]+") }}
|
2018-05-24 20:02:27 +02:00
|
|
|
{% endif %}
|
2018-12-22 23:29:30 +01:00
|
|
|
|
2022-08-09 18:51:17 +02:00
|
|
|
{{ render_field(form.file_upload, fieldclass="form-control-file", class_="mt-3", accept=".zip") }}
|
2019-01-28 21:48:07 +01:00
|
|
|
|
2020-12-04 02:43:20 +01:00
|
|
|
<p>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Take a look at the <a href='/help/package_config/'>Package Configuration and Releases Guide</a> for
|
|
|
|
tips on customising releases.") }}
|
2020-12-04 02:43:20 +01:00
|
|
|
</p>
|
|
|
|
|
2024-10-15 22:36:50 +02:00
|
|
|
<h3 class="mt-5">{{ _("3. Supported Luanti versions") }}</h3>
|
2020-12-04 02:43:20 +01:00
|
|
|
|
2019-01-28 21:48:07 +01:00
|
|
|
<div class="row">
|
|
|
|
{{ render_field(form.min_rel, class_="col-sm-6") }}
|
|
|
|
{{ render_field(form.max_rel, class_="col-sm-6") }}
|
|
|
|
</div>
|
|
|
|
|
2023-12-26 15:50:55 +01:00
|
|
|
<p id="minmax_warning" class="text-danger d-none">
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Maximum must be greater than or equal to the minimum!") }}
|
2019-01-28 23:28:47 +01:00
|
|
|
</p>
|
|
|
|
|
2023-12-26 15:50:55 +01:00
|
|
|
<p id="latest_release" class="text-warning d-none">
|
|
|
|
{% set last = form.max_rel | last_it %}
|
|
|
|
<strong>
|
|
|
|
{{ _("Are you sure your package doesn't work on versions after %(version)s?", version=last.label) }}
|
|
|
|
</strong>
|
2024-10-15 22:36:50 +02:00
|
|
|
{{ _("Only set the maximum version if you know that it doesn't work on newer Luanti versions.") }}
|
2023-12-26 15:50:55 +01:00
|
|
|
{{ _("Don't set the maximum version just because you haven't tested it on newer versions.") }}
|
|
|
|
<p>
|
|
|
|
|
2021-02-28 22:30:54 +01:00
|
|
|
<p>
|
2023-08-22 20:58:43 +02:00
|
|
|
<i class="fas fa-exclamation-circle me-2"></i>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("The .conf of your package can <a href='/help/package_config/'>set this automatically</a>,
|
|
|
|
which will override your selection.") }}
|
2021-02-28 22:30:54 +01:00
|
|
|
</p>
|
2022-01-08 00:27:00 +01:00
|
|
|
|
2019-01-28 23:28:47 +01:00
|
|
|
<p>
|
2024-10-15 22:36:50 +02:00
|
|
|
{{ _("Set the minimum and maximum Luanti versions supported.
|
2022-01-08 00:27:00 +01:00
|
|
|
This release will be hidden to clients outside of that range. ") }}
|
2023-12-26 15:50:55 +01:00
|
|
|
<br>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Leave both as None if in doubt.") }}
|
2020-12-04 02:43:20 +01:00
|
|
|
</p>
|
2023-12-26 15:50:55 +01:00
|
|
|
|
2020-12-04 02:43:20 +01:00
|
|
|
<p class="mt-5">
|
|
|
|
{{ render_submit_field(form.submit) }}
|
|
|
|
</p>
|
2018-03-20 19:40:19 +01:00
|
|
|
</form>
|
|
|
|
{% endblock %}
|
2019-01-28 23:28:47 +01:00
|
|
|
|
2024-06-22 16:48:54 +02:00
|
|
|
{% from "macros/forms.html" import easymde_scripts %}
|
2019-01-28 23:28:47 +01:00
|
|
|
{% block scriptextra %}
|
2024-06-22 16:48:54 +02:00
|
|
|
{{ easymde_scripts() }}
|
2023-12-26 15:50:55 +01:00
|
|
|
<script src="/static/js/release_minmax.js?v=2"></script>
|
2024-06-22 16:18:58 +02:00
|
|
|
<script src="/static/js/release_new.js?v=2"></script>
|
2019-01-28 23:28:47 +01:00
|
|
|
{% endblock %}
|