Closed Bug 610893 Opened 14 years ago Closed 14 years ago

Add post-commit hook to SVN, automatically creating JSON files after commit to product-details

Categories

(mozilla.org Graveyard :: Server Operations, task)

All
Other
task
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: wenzel, Assigned: aravind)

Details

Our product details library is edited in PHP files here:

http://viewvc.svn.mozilla.org/vc/libs/product-details/

When these files change, one must run ./export_json.php to create JSON data files for everyone to consume. If this step is missed, evil comes upon us.

We should add a post-commit hook in SVN that automatically runs the export_json script when there's a commit to the aforementioned directory.

Please let me know if that's enough information for you or if you need me to write some code for this.
(In reply to comment #0)
> We should add a post-commit hook in SVN that automatically runs the export_json
> script when there's a commit to the aforementioned directory.

It needs to run that script and commit the generated JSON files (if they differ), of course.
Jbalogh mentioned, committing out of a post-commit hook might not work. Another option for us would be to reject the commit if export_json would alter the JSON files (which means, the commit results in inconsistent JSON files and needs to be fixed).
If it's easier than IT getting a post-commit hook working, I can set up a cronjob on my server that just checks this every 5 min. or so and commits a new export_json if it is needed.
Thanks, I was considering something like that too, I use a similar thing on khan for auto-updating the L10n files on two projects.
Assignee: server-ops → aravind
Is this still needed?

Also, comment 3 kind of confused me.  Could you please explain what's needed better?
I think we're fine here. We're going to revamp the way product-details work in 2011 (or so I hope).
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
wenzel any short term solution at sight?
We had to file bug 624658 to deal with more new locales.
Yea, I'll take a look at it today.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.