Closed Bug 968657 Opened 6 years ago Closed 6 years ago

Add |make watch| to monitor files change and build for specific app.

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: yurenju, Assigned: gweng)

References

Details

Attachments

(1 file, 1 obsolete file)

47 bytes, text/x-github-pull-request
yurenju
: review+
Details | Review
after bug 897352 land, all apps will be assembled in build_stage directory, we should have a monitor feature to detect file change and build for specific app.

when user execute |make monitor|, build system will build a gaia profile and monitor file change, if user change GAIA_DIR/apps/homescreen/js/grid.js, |APP=homescreen make| will be executed.
I've a almost done patch for this, so I take it now.
Assignee: nobody → gweng
Attached file WIP Patch (obsolete) —
This WIP patch works, but it still lacks:

1. Windows' separator should be considered in the parsePath function
2. Even after the make, some files (multi-localization related) still be changed and thus would cause a infinite make. I use 5 secs to wait them to avoid the problem.

I may spend sometimes to fix these bugs in the future.
Attachment #8372114 - Flags: feedback?(yurenju.mozilla)
Comment on attachment 8372114 [details] [review]
WIP Patch

Great! there are to suggestions:
1. LOCALE_BASEDIR should also be monitored for l10n, we could have a argument to change listening directory.
2. watcher.js should be tested, we can use |make build-test-unit| to test build module, please check GAIA_DIR/build/test/unit/ for it.
Attachment #8372114 - Flags: feedback?(yurenju.mozilla) → feedback+
Attached file Patch
The patch. Added tests and other minor fixes.
Attachment #8372114 - Attachment is obsolete: true
Attachment #8373183 - Flags: review?(yurenju.mozilla)
Comment on attachment 8373183 [details] [review]
Patch

r=yurenju if nits is addressed, thank you Greg!
Attachment #8373183 - Flags: review?(yurenju.mozilla) → review+
The Travis failed at a totally irrelevant test.
So I want to merge it.

https://travis-ci.org/mozilla-b2g/gaia/jobs/18704279
master: https://github.com/mozilla-b2g/gaia/commit/f4f68e9942feada3fcc12c74c6023f0b17b726d2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: Gaia → Gaia::Build
You need to log in before you can comment on or make changes to this bug.