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">
|
|
|
|
<a class="float-right btn btn-sm btn-secondary" href="{{ package.getUpdateConfigURL() }}">{{ _("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.") }}
|
|
|
|
{{ _("You can enable automatic updates in the update detection settings.") }}
|
|
|
|
{% 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 %}
|
|
|
|
<a class="float-right btn btn-sm btn-info" href="{{ package.getSetupReleasesURL() }}">{{ _("Set up") }}</a>
|
|
|
|
<i class="fas fa-info mr-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 %}
|
|
|
|
<a class="float-right btn btn-sm btn-info" href="{{ package.getEditURL() }}">{{ _("Add Git repo") }}</a>
|
|
|
|
<i class="fas fa-info mr-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() }}
|
|
|
|
|
2020-12-04 02:43:20 +01:00
|
|
|
<h3>1. Name release</h3>
|
|
|
|
|
2018-05-29 23:43:42 +02:00
|
|
|
{{ render_field(form.title, placeholder="Human readable. Eg: 1.0.0 or 2018-05-28") }}
|
2020-12-04 02:43:20 +01:00
|
|
|
|
|
|
|
<h3 class="mt-5">2. Set the content</h3>
|
|
|
|
|
2018-12-22 23:29:30 +01:00
|
|
|
<p class="mb-0">Method</p>
|
|
|
|
{{ render_radio_field(form.uploadOpt) }}
|
|
|
|
|
2018-06-06 00:13:39 +02:00
|
|
|
{% if package.repo %}
|
2020-12-05 23:29:37 +01:00
|
|
|
{{ render_field(form.vcsLabel, placeholder="Leave blank to use default branch", class_="mt-3",
|
|
|
|
pattern="[A-Za-z0-9/._-]+") }}
|
2018-05-24 20:02:27 +02:00
|
|
|
{% endif %}
|
2018-12-22 23:29:30 +01:00
|
|
|
|
2019-07-29 23:34:39 +02:00
|
|
|
{{ render_field(form.fileUpload, 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>
|
|
|
|
Take a look at the <a href="/help/package_config/">Package Configuration and Releases Guide</a> for
|
|
|
|
tips on customising releases.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3 class="mt-5">3. Supported Minetest versions</h3>
|
|
|
|
|
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>
|
|
|
|
|
2019-01-28 23:28:47 +01:00
|
|
|
<p id="minmax_warning" style="color:#f00; display: none;">
|
|
|
|
Maximum must be greater than or equal to the minimum!
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2020-12-04 02:43:20 +01:00
|
|
|
Set the minimum and maximum Minetest versions supported.
|
|
|
|
This release will be hidden to clients outside of that range.<br />
|
2019-01-29 01:18:49 +01:00
|
|
|
Leave both as None if in doubt.
|
2020-12-04 02:43:20 +01:00
|
|
|
You can <a href="/help/package_config/">set this automatically</a> in the .conf of your package.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
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.
|
2019-01-28 23:28:47 +01:00
|
|
|
</p>
|
|
|
|
|
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>
|
2020-12-04 02:43:20 +01:00
|
|
|
|
2018-03-20 19:40:19 +01:00
|
|
|
{% endblock %}
|
2019-01-28 23:28:47 +01:00
|
|
|
|
|
|
|
{% block scriptextra %}
|
|
|
|
<script src="/static/release_minmax.js?v=1"></script>
|
2019-01-29 00:16:51 +01:00
|
|
|
<script>
|
|
|
|
function check_opt() {
|
|
|
|
if ($("input[name=uploadOpt]:checked").val() == "vcs") {
|
|
|
|
$("#fileUpload").parent().hide();
|
|
|
|
$("#vcsLabel").parent().show();
|
|
|
|
} else {
|
|
|
|
$("#fileUpload").parent().show();
|
|
|
|
$("#vcsLabel").parent().hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("input[name=uploadOpt]").change(check_opt);
|
|
|
|
check_opt();
|
|
|
|
</script>
|
2019-01-28 23:28:47 +01:00
|
|
|
{% endblock %}
|