rename existing `SerialAutoChecker.getWhitelabel` method to `getSignatureWhitelabelPrefix`
This commit is contained in:
parent
8d7fe95fe7
commit
d1d8644c7c
|
@ -1,2 +1,2 @@
|
|||
auto_update_root_url=https://rusefi.com/build_server
|
||||
WHITELABEL=rusEFI
|
||||
signature_white_label=rusEFI
|
||||
|
|
|
@ -30,11 +30,11 @@ else
|
|||
echo "! Current branch is: $branchname" >> ${TEMP_FILE}
|
||||
fi
|
||||
|
||||
if [ -z "${WHITELABEL}" ]; then
|
||||
WHITELABEL=rusEFI
|
||||
if [ -z "${signature_white_label}" ]; then
|
||||
signature_white_label=rusEFI
|
||||
fi
|
||||
|
||||
echo "#define TS_SIGNATURE \"${WHITELABEL} $branchname.$date.${SHORT_BOARD_NAME}.@@SIGNATURE_HASH@@\"" >> ${TEMP_FILE}
|
||||
echo "#define TS_SIGNATURE \"${signature_white_label} $branchname.$date.${SHORT_BOARD_NAME}.@@SIGNATURE_HASH@@\"" >> ${TEMP_FILE}
|
||||
|
||||
# We will generate the signature in a temp file, then only use it if it has changed.
|
||||
# This is to avoid updating the timestamp of the signature file, which would cause the configs to regenerate when they don't need to.
|
||||
|
|
|
@ -65,8 +65,8 @@ public class SerialAutoChecker {
|
|||
private static boolean isSignatureWithValidPrefix(String signature) {
|
||||
if (signature.startsWith(Fields.PROTOCOL_SIGNATURE_PREFIX))
|
||||
return true;
|
||||
String whitelabel = ConnectionAndMeta.getWhitelabel();
|
||||
return whitelabel != null && signature.startsWith(whitelabel + " ");
|
||||
String signatureWhiteLabel = ConnectionAndMeta.getSignatureWhiteLabel();
|
||||
return signatureWhiteLabel != null && signature.startsWith(signatureWhiteLabel + " ");
|
||||
}
|
||||
|
||||
public void openAndCheckResponse(PortDetector.DetectorMode mode, AtomicReference<AutoDetectResult> result, Function<CallbackContext, Void> callback) {
|
||||
|
|
|
@ -33,10 +33,10 @@ public class ConnectionAndMeta {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static String getWhitelabel() {
|
||||
String whitelabel = getProperties().getProperty("WHITELABEL");
|
||||
whitelabel = whitelabel == null ? null : whitelabel.trim();
|
||||
return whitelabel;
|
||||
public static String getSignatureWhiteLabel() {
|
||||
String signatureWhiteLabel = getProperties().getProperty("signature_white_label");
|
||||
signatureWhiteLabel = signatureWhiteLabel == null ? null : signatureWhiteLabel.trim();
|
||||
return signatureWhiteLabel;
|
||||
}
|
||||
|
||||
private static Properties getProperties() throws RuntimeException {
|
||||
|
|
Loading…
Reference in New Issue