release self-identification to become release.txt #7229

only:uaefi
This commit is contained in:
rusefi 2025-01-08 16:14:00 -05:00 committed by rusefillc
parent e8b01473be
commit e2ef8c7fda
3 changed files with 10 additions and 5 deletions

View File

@ -9,6 +9,7 @@ import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.TreeMap;
import static com.devexperts.logging.Logging.getLogging;
@ -54,8 +55,12 @@ public class BundleUtil {
String pair[] = line.split("=", 2);
keyValues.put(pair[0], pair[1]);
}
String target = keyValues.get("target");
String target = keyValues.get("platform");
String branchName = keyValues.get("release");
if (target == null || branchName == null) {
log.info(BRANCH_REF_FILE + " says " + keyValues);
return BundleInfo.UNKNOWN;
}
return new BundleInfo(branchName, target);
}
@ -66,8 +71,8 @@ public class BundleUtil {
private final String target;
public BundleInfo(String branchName, String target) {
this.branchName = branchName;
this.target = target;
this.branchName = Objects.requireNonNull(branchName, "branchName");
this.target = Objects.requireNonNull(target, "target");
}
public static boolean isUndefined(BundleInfo bundleInfo) {

View File

@ -10,7 +10,7 @@ public interface rusEFIVersion {
* *** BE CAREFUL WE HAVE SEPARATE AUTOUPDATE_VERSION also managed manually ***
* @see com.rusefi.autoupdate.Autoupdate#AUTOUPDATE_VERSION
*/
int CONSOLE_VERSION = 20250101;
int CONSOLE_VERSION = 20250108;
AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
static long classBuildTimeMillis() {

View File

@ -8,7 +8,7 @@ import java.util.Arrays;
public class BundleUtilTest {
@Test
public void testExtractBundleTarget() {
BundleUtil.BundleInfo info = BundleUtil.parse(Arrays.asList("target=proteus_f7", "release=development"));
BundleUtil.BundleInfo info = BundleUtil.parse(Arrays.asList("platform=proteus_f7", "release=development"));
Assertions.assertEquals("proteus_f7", info.getTarget());
Assertions.assertEquals("development", info.getBranchName());