kiwix / kiwix-apple-custom

GNU General Public License v3.0
2 stars 2 forks source link

Custom Apps CD - per brand, set version from release tag #17

Closed BPerlakiH closed 9 months ago

BPerlakiH commented 10 months ago

We want to build and deliver custom apps via a manual trigger, similar to kiwix/kiwix-android-custom. Assumptions:

kelson42 commented 10 months ago

@BPerlakiH @rgaudin Maybe I got that wrong, but I though we agreed that the whole version comes from the tag?!

BPerlakiH commented 10 months ago

@kelson42 I think we can change it to be the whole version. We can validate against the brand folder name and the URL / file name (ending) contained in the info.json.

BPerlakiH commented 10 months ago

I've updated the code, now it is validating against the brand folder, and the date that is in the URL. A valid tag now looks like the following ones:

ect. There are also reasonable error messages added, such as:

dwds_2033.03.02
Error: Invalid tag dwds_2033.03.02: invalid year: 2033

dwds_2023.13.02
Error: Invalid tag dwds_2023.13.02: invalid month: 13

dwds_2023.03.02
Error: Invalid date in tag: dwds_2023.03.02, does not match year.month of ZIM file in dwds/info.json, it should be: 2023.12.2

dwds_2023.03.189
Error: Invalid date in tag: dwds_2023.03.189, does not match year.month of ZIM file in dwds/info.json, it should be: 2023.12.189

dds_2023.03.189 
Error: Invalid tag dds_2023.03.189: The directory for brand: 'dds' does not exist

> mkdir wiki
wiki_2023.03.189
Error: Invalid tag wiki_2023.03.189: There is no info.json file for brand 'wiki'
BPerlakiH commented 10 months ago

@kelson42 @rgaudin it has been implemented, and tested with this tag/release: https://github.com/kiwix/kiwix-apple-custom/actions/runs/7514404208

kelson42 commented 10 months ago

@BPerlakiH Good, but where is the code to review?

BPerlakiH commented 10 months ago

It has been merged into kiwix/kiwix-apple-custom main branch.