Skip to content

Commit 6dd8533

Browse files
umbynosStefania
and
Stefania
authored
update agent autoupdate behaviour (#439)
* update agent autoupdate behaviour - Now it's possible to rollback the agent by modifying the `agent-version.json` on s3 - Update mechanism is not triggered anymore if the agent contains a semver with `rc` (e.g. 1.2.1-rc1) * Update socket-daemon.js fixed comparison Co-authored-by: Stefania <[email protected]>
1 parent ab30d06 commit 6dd8533

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/socket-daemon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default class SocketDaemon extends Daemon {
165165
if (found) {
166166
return fetch('https://s3.amazonaws.com/arduino-create-static/agent-metadata/agent-version.json')
167167
.then(response => response.json().then(data => {
168-
if (this.agentInfo.version && (semVerCompare(this.agentInfo.version, data.Version) >= 0 || this.agentInfo.version.indexOf('dev') !== -1)) {
168+
if (this.agentInfo.version && (semVerCompare(this.agentInfo.version, data.Version) === 0 || this.agentInfo.version.indexOf('dev') !== -1 || this.agentInfo.version.indexOf('rc') !== -1)) {
169169
return this.agentInfo;
170170
}
171171

0 commit comments

Comments
 (0)