You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
thrownewError(`The "CFBundleShortVersionString" key in the "${resolvedPlistFile}" needs to have at least a major and minor version, for example "2.0" or "1.0.3".`);
@@ -907,30 +908,66 @@ function getReactNativeProjectAppVersion(command: cli.IReleaseReactCommand, proj
907
908
thrownewError(`The "CFBundleShortVersionString" key doesn't exist within the "${resolvedPlistFile}" file.`);
thrownewError(`The "android.defaultConfig.versionName" property value in "android/app/build.gradle" is not a valid string. If this is expected, consider using the --targetBinaryVersion option to specify the value manually.`);
thrownewError("The \"android.defaultConfig.versionName\" property in \"android/app/build.gradle\" needs to have at least a major and minor version, for example \"2.0\" or \"1.0.3\".");
930
-
}
931
-
}else{
932
-
thrownewError("The \"android/app/build.gradle\" file does not include a value for android.defaultConfig.versionName.");
thrownewError(`The "android.defaultConfig.versionName" property value in "android/app/build.gradle" is not a valid string. If this is expected, consider using the --targetBinaryVersion option to specify the value manually.`);
// The versionName property is a valid semver string,
933
+
// so we can safely use that and move on.
934
+
returnappVersion;
935
+
}elseif(/^\d.*/.test(appVersion)){
936
+
// The versionName property isn't a valid semver string,
937
+
// but it starts with a number, and therefore, it can't
938
+
// be a valid Gradle property reference.
939
+
thrownewError(`The "android.defaultConfig.versionName" property in "android/app/build.gradle" needs to specify a valid semver string, containing both a major and minor version (e.g. 1.3.2, 1.1).`);
940
+
}
941
+
942
+
// The version property isn't a valid semver string
943
+
// so we assume it is a reference to a property variable.
thrownewError(`Unable to parse "${propertiesFile}". Please ensure it is a well-formed properties file.`);
960
+
}
961
+
962
+
if(!appVersion){
963
+
thrownewError(`No property named "${propertyName}" exists in the "${propertiesFile}" file.`);
964
+
}
965
+
966
+
if(!isValidVersion(appVersion)){
967
+
thrownewError(`The "${propertyName}" property in "${propertiesFile}" needs to specify a valid semver string, containing both a major and minor version (e.g. 1.3.2, 1.1).`);
0 commit comments