espruino / espruino/BangleApps

Keeping forks up to date

Open
#2,847 15 comments 2 reactions 0 assignees View on GitHub
area-dev state-started type-enhancement
Dominant language
JavaScript
Stars
571
Forks
1.3k
Avg merge
17h 38m
Merged PRs (30d)
17

Description

There are a bunch of apps that end up being copies of other apps/code but with some changes applied.

Often that original code will have some changes/bugfixes later down the line and it's always a pain to ensure that those get propagated.

Discussed:

* https://github.com/espruino/BangleApps/commit/625f31c8d44258bd977ce1a757a720e7da5f8ad0
* https://github.com/espruino/BangleApps/pull/2843#issuecomment-1612147866

The apps might be copies of other apps in the repo, or of built-in functionality that is in other places like https://github.com/espruino/Espruino/blob/master/libs/js/banglejs/E_showMenu_Q3.js

So how do we keep these up to date?

As a simple, fast solution, I'm coming down on something like an entry in `metadata.json`:

```
{
// ...
patches : [
{ ours: "app.js", theirs : "https://raw.githubusercontent.com/espruino/Espruino/master/libs/js/banglejs/E_showMenu_Q3.js", patch: "appchanges.patch" }
]
}
```

So then (maybe even just in `sanitycheck.js`) we just grab the file from the URL given, attempt to patch it and compare the result, then flag up a warning if the two differ or the patch fails to apply?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.