Skip to content

Commit bdf2993

Browse files
committed
ADD: dev lane for updates.json
1 parent 11ba1b5 commit bdf2993

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

controls/roles/update-services/tasks/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
2+
- name: Set lane suffix
3+
set_fact:
4+
updates_lane_suffix: "{{ '.dev' if (stereum.settings.updates.lane | default('stable')) == 'dev' else '' }}"
5+
26
- name: Download update metadata
37
uri:
4-
url: https://stereum.net/downloads/updates.json
8+
url: "https://stereum.net/downloads/updates{{ updates_lane_suffix }}.json"
59
method: GET
610
return_content: yes
711
status_code: 200
@@ -26,5 +30,4 @@
2630
- name: Update services
2731
include_tasks: update-service.yml
2832
with_items: "{{ services_to_update }}"
29-
3033
# EOF

controls/roles/update-stereum/tasks/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
state: absent
66
become: yes
77

8+
- name: Set lane suffix
9+
set_fact:
10+
updates_lane_suffix: "{{ '.dev' if (stereum.settings.updates.lane | default('stable')) == 'dev' else '' }}"
11+
812
- name: Download update metadata
913
uri:
10-
url: https://stereum.net/downloads/updates.json
14+
url: "https://stereum.net/downloads/updates{{ updates_lane_suffix }}.json"
1115
method: GET
1216
return_content: true
1317
status_code: 200

launcher/src/backend/NodeConnection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class NodeConnection {
2929
this.nodeConnectionParams = nodeConnectionParams;
3030
this.os = null;
3131
this.osv = null;
32+
this.settings = null;
3233
this.nodeUpdates = new NodeUpdates(this);
3334
this.configManager = new ConfigManager(this);
3435
}

launcher/src/backend/NodeUpdates.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export class NodeUpdates {
3737
* @returns {Object} - updates available for services
3838
*/
3939
async checkUpdates() {
40-
let response = await axios.get("https://stereum.net/downloads/updates.json");
40+
if (!this.nodeConnection?.settings?.lane) {
41+
await this.nodeConnection.findStereumSettings();
42+
}
43+
const lane = this.nodeConnection?.settings?.lane || "stable";
44+
let response = await axios.get(`https://stereum.net/downloads/updates${lane == "dev" ? ".dev" : ""}.json`);
4145
if (global.branch === "main") response.data.stereum.push({ name: "HEAD", commit: "main" });
4246
return response.data;
4347
}

0 commit comments

Comments
 (0)