Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove image check shim for 2024_v2.0 #754

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ public List<String> 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<String> allowedImageVersions) {
return "Invalid RoboRIO Image Version!" +
"\nRoboRIO image and GradleRIO versions are incompatible:" +
Expand All @@ -46,12 +34,6 @@ public InvalidImageException(String imageVersion, List<String> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down