From dbadc751a329bff89dbf6ecebb78b5c9e4f22cff Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Tue, 15 Oct 2024 15:17:25 -0400 Subject: [PATCH] remove image check shim for 2024_v2.0 --- .../deploy/roborio/InvalidImageException.java | 18 ------------------ .../gradlerio/deploy/roborio/RoboRIO.java | 4 ---- 2 files changed, 22 deletions(-) diff --git a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/InvalidImageException.java b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/InvalidImageException.java index 016e4829..2ff9590c 100644 --- a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/InvalidImageException.java +++ b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/InvalidImageException.java @@ -16,18 +16,6 @@ public List getAllowedImageVersions() { return allowedImageVersions; } - private static String parseMessage(String imageVersion) { - return "Invalid RoboRIO Image Version!" + - "\nRoboRIO image and GradleRIO versions are incompatible:" + - "\n\tCurrent image version: " + imageVersion + - "\n\tGradleRIO-compatible image versions: 2024_v2.* except 2024_v2.0" + - "\nSee https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-3/imaging-your-roborio.html" + - "for information about upgrading the RoboRIO image." + - "\nSee https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html and" + - "\nhttps://docs.wpilib.org/en/stable/docs/software/vscode-overview/importing-gradle-project.html" + - "\nfor information about updating WPILib and GradleRIO."; - } - private static String parseMessage(String imageVersion, List allowedImageVersions) { return "Invalid RoboRIO Image Version!" + "\nRoboRIO image and GradleRIO versions are incompatible:" + @@ -46,12 +34,6 @@ public InvalidImageException(String imageVersion, List allowedImageVersi this.allowedImageVersions = new ArrayList<>(allowedImageVersions); } - public InvalidImageException(String imageVersion, boolean isSpecialCase) { - super(parseMessage(imageVersion)); - this.imageVersion = imageVersion; - this.allowedImageVersions = new ArrayList<>(); - } - public InvalidImageException() { super("Could not parse image version!"); allowedImageVersions = List.of(); diff --git a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/RoboRIO.java b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/RoboRIO.java index 049642c4..4524fa6e 100644 --- a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/RoboRIO.java +++ b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/RoboRIO.java @@ -150,10 +150,6 @@ private void readAndVerifyImage(DeployContext context) { } private void verifyImageVersion(String image) { - if (image.equalsIgnoreCase("2024_v2.0")) { - throw new InvalidImageException(image, true); - } - boolean foundMatch = validImageVersions.stream().filter(x -> { int index = x.indexOf("*"); if (index == -1) {