Files
ota-admin-portal/src/utils/softwareVersions.js
John Wu 9cf84fc426 CEC-3672 Update manifest version on deploy (#277)
* CEC-3672 Add versions to CarUpdatesContext
Stub out getSoftwareVersions and updateManifestVersion

* CEC-3672 update version on deploy

* Validate version before updating
2023-02-09 11:51:23 -08:00

5 lines
181 B
JavaScript

const rxSoftwareVersion = /^\d{4}\.(0[1-9]|1[0-2])\.\d{2}\.\d{2}(\.[\d\w]{1})?$/i;
export const validateSoftwareVersion = (version) => {
return rxSoftwareVersion.test(version);
}