File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/edu/wpi/first/gradlerio/deploy/roborio Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ private boolean verifyOnlyIf(DeployContext ctx) {
125125
126126 private void readAndVerifyImage (DeployContext context ) {
127127 final String imageFile = "/etc/natinst/share/scs_imagemetadata.ini" ;
128- final Pattern pattern = Pattern .compile ("^IMAGEVERSION\\ s*=\\ s*\\ \" FRC_roboRIO2?_( \\ d{4}_v\\ d+(?:\\ .\\ d+)?)\\ \" " );
128+ final Pattern pattern = Pattern .compile ("^IMAGEVERSION\\ s*=\\ s*\\ \" (FRC_)?roboRIO2?_(?<version> \\ d{4}_v\\ d+(?:\\ .\\ d+)?)\\ \" " );
129129
130130 String content = context .execute ("cat " + imageFile ).getResult ();
131131 log .info ("Received Image File: " );
@@ -136,7 +136,7 @@ private void readAndVerifyImage(DeployContext context) {
136136 log .info (line );
137137 Matcher matcher = pattern .matcher (line .trim ());
138138 if (matcher .matches ()) {
139- String imageGroup = matcher .group (1 );
139+ String imageGroup = matcher .group ("version" );
140140 log .info ("Matched version: " + imageGroup );
141141 verifyImageVersion (imageGroup );
142142 imageFound = true ;
You can’t perform that action at this time.
0 commit comments