aboutsummaryrefslogtreecommitdiff
path: root/templates/download.html
blob: 72c56d7327d957b2486baaaa88644d805e2610db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
{% extends 'base.html' %}

{% block title %}
Downloads | {{ config.title }}
{% endblock %}

{% block content %}
  <section id="download-section" class="section">
    <div class="relative w-full py-8 flex flex-col items-center justify-center bg-gray-50 shadow-sm">
        <h1 class="text-garage-orange font-bold text-2xl text-center">Download Garage</h1>
        <div class="absolute -bottom-8 left-1/2 transform -translate-x-6 w-16 overflow-hidden inline-block">
            <div class="h-8 w-8 bg-gradient-to-bl from-gray-50 via-gray-50 to-gray-100 -rotate-45 transform origin-top-left shadow"></div>
        </div>
    </div>
    <div class="mx-auto max-w-7xl px-4">
        <div id="releases-container" class="py-24 space-y-20">
            <div id="docker-images" class="space-y-4">
                <h2 class="text-garage-gray text-xl font-semibold">Deploy with Docker</h2>
                <p>All of the builds listed in the sections below can be downloaded as Docker images
                available
                  <a href="https://hub.docker.com/r/dxflrs/garage" class="text-garage-orange font-bold hover:underline">on the Docker hub</a>.
                </p>
            </div>
            <div id="docker-images" class="space-y-4">
                <h2 class="text-garage-gray text-xl font-semibold">Release notes (changelogs)</h2>
                <p>Release notes for each Garage release can be read
                  <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/releases" class="text-garage-orange font-bold hover:underline">on our Gitea instance</a>.
                </p>
            </div>
            <div id="release-builds" class="space-y-4">
                <h2 class="text-garage-gray text-xl font-semibold">Release Builds</h2>
                <div id="release-builds-container" class="space-y-12"></div>
            </div>
            <div id="extra-builds" class="space-y-4">
                <h2 class="text-garage-gray text-xl font-semibold">Extra Builds</h2>
                <p>Extra builds are built on demand to test a specific feature or a specific need.</p>
                <details>
                    <summary class="text-garage-orange font-bold cursor-pointer">Show Extra Builds</summary>
                    <div id="extra-builds-container" class="space-y-12"></div>
                </details>
            </div>
            <div id="development-builds" class="space-y-4">
                <h2 class="text-garage-gray text-xl font-semibold">Development Builds</h2>
                <p>Development builds are built periodically. Use them if you want to test a specific feature that is not yet released.</p>
                <details>
                    <summary class="text-garage-orange font-bold cursor-pointer">Show Development Builds</summary>
                    <div id="development-builds-container" class="space-y-12"></div>
                </details>
            </div>
            <div class="space-y-4">
                <p>
                  If this page is not loading correctly,
                  <a class="font-bold text-garage-orange hover:underline" href="https://garagehq.deuxfleurs.fr/_releases.html">click here</a>.
                </p>
            </div>
        </div>
        <noscript>
            <style type="text/css">
                #releases-container{display:none;}
            </style>
            <div id="js-disabled-msg" class="p-12" style="height:70vh">
                Access the Garage releases by clicking on the following link :
                <a class="font-bold text-garage-orange hover:underline" href="https://garagehq.deuxfleurs.fr/_releases.html">https://garagehq.deuxfleurs.fr/_releases.html</a>
            </div>
        </noscript>
    </div>
  </section>
{% endblock %}

{% block custom_js %}
<script>
    var getJSON = function(url, callback) {
        var xmlhttprequest = new XMLHttpRequest();
        xmlhttprequest.open('GET', url, true);
        xmlhttprequest.responseType = 'json';
        xmlhttprequest.onload = function() {
            var status = xmlhttprequest.status;
            if (status == 200) {
                callback(null, xmlhttprequest.response);
            } else {
                callback(status, xmlhttprequest.response);
            }
        };
        xmlhttprequest.send();
    };
    
    getJSON('https://garagehq.deuxfleurs.fr/_releases.json',  function(err, data) {

        err != null ?? (console.error(err), die());

        if (err == null) {

            let releaseBuilds = data[0].builds;
            let extraBuilds = data[1].builds;
            let developmentBuilds = data[2].builds;

            /** Release Builds */
            for (i = 0; i < releaseBuilds.length; i++) {
                window['build' + i] =
                `
                <div class="mt-8 bg-gray-50 border border-gray-200 p-4 rounded shadow-sm">
                    <h3 class="flex flex-col space-y-1.5 font-extrabold text-garage-orange">
                        <span>${releaseBuilds[i]['version']}</span>
                        <span class="text-garage-gray font-normal text-sm">${releaseBuilds[i]['builds'][0]['date']}</span>
                    </h3>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Binaries</span>
                    <div id="release-builds-detail-${i}" class="flex flex-col md:flex-row items-start md:items-center space-x-0 md:space-x-2 space-y-2 md:space-y-0"></div>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Sources</span>
                    <div id="release-builds-source-${i}" class="flex items-center space-x-2">
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/${releaseBuilds[i]['version']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <span>Gitea</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${releaseBuilds[i]['version']}.zip" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.zip</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${releaseBuilds[i]['version']}.tar.gz" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.tar.gz</span>
                        </a>
                    </div>
                </div>
                `;
                document.getElementById('release-builds-container').innerHTML += window['build' + i];
                for (j = 0; j < releaseBuilds[i]['builds'].length; j++) {
                    window['buildDetail' + i] =
                    `
                    <a href="${releaseBuilds[i]['builds'][j]['url']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                        <span>
                            ${releaseBuilds[i]['builds'][j]['platform']
                            .replace('aarch64-unknown-linux-musl', 'linux/arm64')
                            .replace('armv6l-unknown-linux-musleabihf', 'linux/arm')
                            .replace('i686-unknown-linux-musl', 'linux/386')
                            .replace('x86_64-unknown-linux-musl', 'linux/amd64')}
                        </span>
                    </a>
                    `; 
                    document.getElementById('release-builds-detail-' + i).innerHTML += window['buildDetail' + i];
                }
            }

            /** Extra Builds */
            for (i = 0; i < extraBuilds.length; i++) {
                window['build' + i] =
                `
                <div class="mt-8 bg-gray-50 border border-gray-200 p-4 rounded shadow-sm">
                    <h3 class="flex flex-col space-y-1.5 font-extrabold text-garage-orange">
                        <span>${extraBuilds[i]['version']}</span>
                        <span class="text-garage-gray font-normal text-sm">${extraBuilds[i]['builds'][0]['date']}</span>
                    </h3>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Binaries</span>
                    <div id="extra-builds-detail-${i}" class="flex flex-col md:flex-row items-start md:items-center space-x-0 md:space-x-2 space-y-2 md:space-y-0"></div>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Sources</span>
                    <div id="extra-builds-source-${i}" class="flex items-center pt-4 space-x-2">
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/${extraBuilds[i]['version']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <span>Gitea</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${extraBuilds[i]['version']}.zip" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.zip</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${extraBuilds[i]['version']}.tar.gz" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.tar.gz</span>
                        </a>
                    </div>
                </div>
                `;
                document.getElementById('extra-builds-container').innerHTML += window['build' + i];
                for (j = 0; j < extraBuilds[i]['builds'].length; j++) {
                    window['buildDetail' + i] =
                    `
                    <a href="${extraBuilds[i]['builds'][j]['url']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                        <span>
                            ${extraBuilds[i]['builds'][j]['platform']
                            .replace('aarch64-unknown-linux-musl', 'linux/arm64')
                            .replace('armv6l-unknown-linux-musleabihf', 'linux/arm')
                            .replace('i686-unknown-linux-musl', 'linux/386')
                            .replace('x86_64-unknown-linux-musl', 'linux/amd64')}
                        </span>
                    </a>
                    `; 
                    document.getElementById('extra-builds-detail-' + i).innerHTML += window['buildDetail' + i];
                }
            }

            /** Development Builds */
            for (i = 0; i < developmentBuilds.length; i++) {
                window['build' + i] =
                `
                <div class="mt-8 bg-gray-50 border border-gray-200 p-4 rounded shadow-sm">
                    <h3 class="flex flex-col space-y-1.5 font-extrabold text-garage-orange">
                        <span>${developmentBuilds[i]['version']}</span>
                        <span class="text-garage-gray font-normal text-sm">${developmentBuilds[i]['builds'][0]['date']}</span>
                    </h3>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Binaries</span>
                    <div id="development-builds-detail-${i}" class="flex flex-col md:flex-row items-start md:items-center space-x-0 md:space-x-2 space-y-2 md:space-y-0"></div>
                    <span class="inline-block mt-4 text-sm mb-1 uppercase text-gray-600">Sources</span>
                    <div id="development-builds-source-${i}" class="flex items-center pt-4 space-x-2">
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/${developmentBuilds[i]['version']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <span>Gitea</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${developmentBuilds[i]['version']}.zip" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.zip</span>
                        </a>
                        <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage/archive/${developmentBuilds[i]['version']}.tar.gz" class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                            <svg class="inline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
                            <span>.tar.gz</span>
                        </a>
                    </div>
                </div>
                `;
                document.getElementById('development-builds-container').innerHTML += window['build' + i];
                for (j = 0; j < developmentBuilds[i]['builds'].length; j++) {
                    window['buildDetail' + i] =
                    `
                    <a href="${developmentBuilds[i]['builds'][j]['url']}" download class="inline-block p-1.5 text-garage-gray font-bold bg-gray-300 hover:bg-orange-300 rounded border-b-2 border-gray-400 hover:border-orange-400 transition-all duration-300">
                        <span>
                            ${developmentBuilds[i]['builds'][j]['platform']
                            .replace('aarch64-unknown-linux-musl', 'linux/arm64')
                            .replace('armv6l-unknown-linux-musleabihf', 'linux/arm')
                            .replace('i686-unknown-linux-musl', 'linux/386')
                            .replace('x86_64-unknown-linux-musl', 'linux/amd64')}
                        </span>
                    </a>
                    `; 
                    document.getElementById('development-builds-detail-' + i).innerHTML += window['buildDetail' + i];
                }
            }
        }
    });
</script>
{% endblock %}