Thanks Mark. BTW, do you guys know of lists or wiki I could get more information regarding GYP tool?
On Wed, Dec 9, 2009 at 5:40 PM, Mark Mentovai <[email protected]> wrote: > There's better info in gclient.py, as a comment. Maybe we can just > rip this off and stick it in a web page somewhere on the developer > site. > > Hooks > .gclient and DEPS files may optionally contain a list named "hooks" to > allow custom actions to be performed based on files that have changed in > the > working copy as a result of a "sync"/"update" or "revert" operation. This > could be prevented by using --nohooks (hooks run by default). Hooks can > also > be forced to run with the "runhooks" operation. If "sync" is run with > --force, all known hooks will run regardless of the state of the working > copy. > > Each item in a "hooks" list is a dict, containing these two keys: > "pattern" The associated value is a string containing a regular > expression. When a file whose pathname matches the > expression > is checked out, updated, or reverted, the hook's "action" > will > run. > "action" A list describing a command to run along with its arguments, > if > any. An action command will run at most one time per gclient > invocation, regardless of how many files matched the pattern. > The action is executed in the same directory as the .gclient > file. If the first item in the list is the string "python", > the current Python interpreter (sys.executable) will be used > to run the command. If the list contains string > "$matching_files" > it will be removed from the list and the list will be > extended > by the list of matching files. > > Example: > hooks = [ > { "pattern": "\\.(gif|jpe?g|pr0n|png)$", > "action": ["python", "image_indexer.py", "--all"]}, > ] > > Marc-Antoine Ruel wrote: > > Humm, that's a good question. Right now the only doc is gclient help > > runhooks which is .. uh .. not really useful. > > > > M-A > > > > On Wed, Dec 9, 2009 at 3:28 PM, Igor Gatis <[email protected]> wrote: > >> Is there documentation somewhere regarding gclient? I'd like to know > more > >> about how hooks and other gclient features work. > >> > >> > >> On Tue, Dec 8, 2009 at 6:27 PM, Mark Mentovai <[email protected]> > wrote: > >>> > >>> Igor Gatis wrote: > >>> > When I change a .gyp, do I need to call gyp or the build process does > >>> > that > >>> > for me? > >>> > >>> When you change it yourself, in your own working copy, you run > >>> "gclient runhooks" to get new files generated. > >>> > >>> When a .gyp change is checked in, you don't need to do this: gclient > >>> will automatically run GYP as needed when you run "gclient sync". > >>> > >>> Mark > >> > >> -- > >> Chromium Developers mailing list: [email protected] > >> View archives, change email options, or unsubscribe: > >> http://groups.google.com/group/chromium-dev > > > -- Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev
