-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(developer): verify package version number format in kmc-package
Ensures that version number field is not blank, and is a recognized format matching the pattern 'number[.number[.number]]'. Each number component should be an integer, without leading zeroes. The format chosen is more restrictive than semver, because much of our existing infrastructure assumes this format anyway. This does lead to a mismatch in version number format for LDML keyboards, which do support semver according to the spec, so this may need to be revisited in the future to allow for full semver formats. Fixes: #13067
- Loading branch information
Showing
5 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...per/src/kmc-package/test/fixtures/invalid/warn_package_version_is_unrecognized_format.kps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Package> | ||
<System> | ||
<KeymanDeveloperVersion>15.0.266.0</KeymanDeveloperVersion> | ||
<FileVersion>7.0</FileVersion> | ||
</System> | ||
<Info> | ||
<!-- blank name --> | ||
<Name URL="">warn_package_version_is_unrecognized_format</Name> | ||
<Copyright URL="">© 2019 National Research Council Canada</Copyright> | ||
<Author URL="mailto:[email protected]">Eddie Antonio Santos</Author> | ||
<Version>1.0-invalid</Version> | ||
</Info> | ||
<Files> | ||
<File> | ||
<Name>basic.kmx</Name> | ||
<Description>Keyboard Basic</Description> | ||
<CopyLocation>0</CopyLocation> | ||
<FileType>.kmx</FileType> | ||
</File> | ||
</Files> | ||
<Keyboards> | ||
<Keyboard> | ||
<Name>Basic</Name> | ||
<ID>basic</ID> | ||
<Version>1.0</Version> | ||
<Languages> | ||
<Language ID="km">Central Khmer (Khmer, Cambodia)</Language> | ||
</Languages> | ||
</Keyboard> | ||
</Keyboards> | ||
</Package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters