Use separate field for UpdateCheckData and other fields that need to be parsed
Currently we use special patterns for some field, e.g UpdateCheckData, and parse them to get the data. This method is fragile and has some limitation. E.g., we split the AutoUpdateMode with spaces to get the suffix and tag pattern so that we can't use space in the suffix. By converting them to seperate field, we can remove some ugly code and use yaml scheme to check them.
Advantages:
- Better readbility
- Better robustness
- Can be verified with yaml scheme
Disadvantages:
- less compact
Proposed scheme:
Update:
auto:
tag: v%v
versionSuffix: -fdroid
check:
mode: Tags
tagPattern: .*-fdroid
name: Ignore
versionCode:
path: app/build.gradle
regex: versionCode\s(\d+)
versionName:
path: .
regex: versionName\s"(.+)"