olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.83k stars 159 forks source link

Adds Update Collections bash script and workflow #242

Closed ggirotto closed 2 years ago

ggirotto commented 2 years ago

Adds the typescript tool script that outputs the collections updates in the format

{
  added: string[],
  updated: string[],
  removed: string[]
}

And adds the workflow that uses this output to run sync-collections script

ggirotto commented 2 years ago
  1. Just have to be aware if there is any issue with node 16 in firebase functions because it's still in beta.

I didn't knew that. I had some problems when using Node 14 but it may be the case that was a problem with act and not with Node. I'll do some tests in the Github environment instead in my local machine

I was thinking of running this script whenever a new diff makes sense in main. I think that attaching a github release with a collection update might not be a good solution, since we don't want necessarily to wait for a release to actually update the local/cloud collections. IMO this script should be ready to sync whenever there is a valid diff in main, and not attached to the release cycle.

But what are the benefits of running on every merge in main? We'll may have unnecessary updates doing this way, because a collection may be updated multiple times in main between two releases. What we could do is to include pre-release releases in the script instead only oficial releases, because Testflight and Google play beta testers will probably fit in this scenario

ggirotto commented 2 years ago

Closed in favor of #247, #248 and #249. Further discussions and changes will be handled there