Skip to content

Commit 559139f

Browse files
author
Matthias Stein
committed
Only show non SNAPSHOT releases
1 parent 5f2325a commit 559139f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/main/js/bundles/mapapps-github-manager/BundleDetailsController.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,13 @@ export default declare([_Connect], {
119119
let content;
120120

121121
if (response.data.length) {
122-
123-
response.data.sort(function(a, b){
124-
return parseFloat(b.name) - parseFloat(a.name);
125-
})
122+
const releases = response.data.filter((release) => !release.name.includes("SNAPSHOT"));
123+
releases.sort((a, b) => parseFloat(b.name) - parseFloat(a.name))
126124

127125
const tagsStore = new ComplexMemory({
128126
id: id,
129127
idProperty: "name",
130-
data: response.data // version contained here
128+
data: releases // version contained here
131129
});
132130

133131
this.bCtx.registerService(["ct.api.Store"], tagsStore, {
@@ -188,8 +186,8 @@ export default declare([_Connect], {
188186
}
189187
if (tag) {
190188
const url = "https://github.com/conterra/" + item.name
191-
+ "/releases/download/" + tag + "/"
192-
+ item.name + "-bundle.zip";
189+
+ "/releases/download/" + tag + "/"
190+
+ item.name + "-bundle.zip";
193191
this.buttonWidget.set("label", this.i18n.downloading);
194192

195193

0 commit comments

Comments
 (0)