Skip to content

Commit

Permalink
Version 3.5.2-rc.1
Browse files Browse the repository at this point in the history
Fixed version check for prereleases
  • Loading branch information
chrishamm committed May 28, 2024
1 parent dee9133 commit 3f65d98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duetwebcontrol",
"version": "3.5.1+1",
"version": "3.5.2-rc.1",
"author": "Christian Hammacher <christian@duet3d.com> (https://www.duet3d.com)",
"homepage": "https://forum.duet3d.com/category/27/duet-web-control",
"license": "GPL-3.0",
Expand Down
11 changes: 8 additions & 3 deletions src/components/dialogs/IncompatibleVersionsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import store from "@/store";
import { LogType } from "@/utils/logging";
import { MachineStatus } from "@duet3d/objectmodel";
const patchDiffs: Array<semver.ReleaseType | null> = ["patch", "prepatch", "prerelease"];
export default Vue.extend({
computed: {
isConnecting(): boolean { return store.state.isConnecting; },
Expand All @@ -56,7 +58,8 @@ export default Vue.extend({
// Check expansion board firmware versions
for (const board of store.state.machine.model.boards) {
if (board.canAddress && board.firmwareVersion && semver.compare(mainboardVersion, board.firmwareVersion, true) !== 0) {
if (semver.satisfies(board.firmwareVersion, '^' + mainboardVersion, true) || semver.satisfies(mainboardVersion, '^' + board.firmwareVersion, true)) {
const vDiff = semver.diff(mainboardVersion, board.firmwareVersion);
if (patchDiffs.includes(vDiff)) {
console.warn(`Expansion board #${board.canAddress} minor version mismatch (MB ${mainboardVersion} != EXP ${board.firmwareVersion})`);
patchVersionMismatch = true;
} else {
Expand All @@ -68,7 +71,8 @@ export default Vue.extend({
// Check DSF version
if (!versionMismatch && store.state.machine.model.sbc !== null && semver.compare(mainboardVersion, store.state.machine.model.sbc.dsf.version, true) !== 0) {
if (semver.satisfies(store.state.machine.model.sbc.dsf.version, '^' + mainboardVersion, true) || semver.satisfies(mainboardVersion, '^' + store.state.machine.model.sbc.dsf.version, true)) {
const vDiff = semver.diff(mainboardVersion, store.state.machine.model.sbc.dsf.version);
if (patchDiffs.includes(vDiff)) {
console.warn(`DSF minor version mismatch (MB ${mainboardVersion} != DSF ${store.state.machine.model.sbc.dsf.version})`);
patchVersionMismatch = true;
} else {
Expand All @@ -79,7 +83,8 @@ export default Vue.extend({
// Check DWC version
if (!versionMismatch && semver.compare(mainboardVersion, packageInfo.version, true) !== 0) {
if (semver.satisfies(packageInfo.version, '^' + mainboardVersion, true) || semver.satisfies(mainboardVersion, '^' + packageInfo.version, true)) {
const vDiff = semver.diff(mainboardVersion, packageInfo.version);
if (patchDiffs.includes(vDiff)) {
console.warn(`DWC minor version mismatch (MB ${mainboardVersion} != DWC ${packageInfo.version})`);
patchVersionMismatch = true;
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default initCollection(DwcPlugin, [
id: "GCodeViewer",
name: "G-Code Viewer",
author: "Juan Rosario",
version: "3.5.1+1",
version: "3.5.2-rc.1",
loadDwcResources: () => import(
/* webpackChunkName: "GCodeViewer" */
"./GCodeViewer/index"
Expand All @@ -19,7 +19,7 @@ export default initCollection(DwcPlugin, [
id: "HeightMap",
name: "Height Map",
author: "Duet3D Ltd",
version: "3.5.1+1",
version: "3.5.2-rc.1",
loadDwcResources: () => import(
/* webpackChunkName: "HeightMap" */
"./HeightMap/index"
Expand All @@ -29,7 +29,7 @@ export default initCollection(DwcPlugin, [
id: "InputShaping",
name: "Input Shaping",
author: "Duet3D Ltd",
version: "3.5.1+1",
version: "3.5.2-rc.1",
loadDwcResources: () => import(
/* webpackChunkName: "InputShaping" */
"./InputShaping/index"
Expand All @@ -39,7 +39,7 @@ export default initCollection(DwcPlugin, [
id: "ObjectModelBrowser",
name: "Object Model Browser",
author: "Duet3D Ltd",
version: "3.5.1+1",
version: "3.5.2-rc.1",
loadDwcResources: () => import(
/* webpackChunkName: "ObjectModelBrowser" */
"./ObjectModelBrowser/index"
Expand All @@ -49,7 +49,7 @@ export default initCollection(DwcPlugin, [
id: "OnScreenKeyboard",
name: "On-Screen Keyboard",
author: "Duet3D Ltd",
version: "3.5.1+1",
version: "3.5.2-rc.1",
loadDwcResources: () => import(
/* webpackChunkName: "OnScreenKeyboard" */
"./OnScreenKeyboard/index"
Expand Down

0 comments on commit 3f65d98

Please sign in to comment.