ODNZSL / nzsl-dictionary-scripts

Scripts needed to support the NZSL mobile applications
MIT License
3 stars 2 forks source link

Automate dictionary quarterly snapshot updates #10

Closed joshmcarthur closed 2 years ago

joshmcarthur commented 4 years ago

This pull request leverages Github Actions to build assets and dictionary database files from Freelex and releases these file via the Releases tab on Github, making the files available for download.

The most significant change here is removing the idea of updating the Android and iOS applications inline with the script run. I've been doing dictionary updates on the native apps for a number of years now, and feel this is not the right thing for this repository to be doing for a number of reasons:

  1. It's a mixture of concerns
  2. To follow through with those app updates still requires full build tooling for Android and iOS to be set up
  3. It doesn't obviously export artefacts other than the two updated repositories

I believe that a smoother workflow is to abstract the applications from these scripts, so the scripts produce the imagery and databases that are used by the applications as releases, and the applications then consume the release to update themselves. This also allows us to direct powerusers who wish to have a snapshot of dictionary data to work with to easily access and download the data they need from these same releases.

I have made Dockerfiles and Makefiles available to make it easier for users to produce their own set of assets and dictionary files if they wish. Github actions is set to run quarterly, on the 1st of January, March, June and September, producing a release using the current date each time. Note that these builds run on UTC time. I have set the time to 13 hours offset, to ensure that server load is during the night in NZ, but the actual builds will be run the day after NZ. I've opted to not offset the dates back to keep the tag and release names nice round numbers (since GH Actions creates the tag and release in UTC time)

An example of a completed build can be found at https://github.com/odnzsl/nzsl-dictionary-scripts/actions/runs/207998964 The corresponding release is at https://github.com/ODNZSL/nzsl-dictionary-scripts/releases/tag/2020-08-15

lgtm-com[bot] commented 4 years ago

This pull request introduces 1 alert and fixes 2 when merging 919eef1484d0939657de4d67e49feab3175ebf70 into 849c88e1e3e504aa1bc7d6ddc505d617da5c8d9b - view on LGTM.com

new alerts:

fixed alerts: