syncStatic script update proposal

Kévin Raymond shaiton at fedoraproject.org
Thu Oct 13 11:27:13 UTC 2011


Hi guys,

Currently the script run hourly to build our website is pulling all
translations.
I would like to add a commit/push then, in order to track each PO
updates. That would ensure for us to do it frequently (currently I do it
manually times to times) and would be faster for us to checkout them
(pulling from Transifex is really slow).

Do we need to pull every hours? We do so much requests on the
transifex.net server. I don't mind, but just wanted to point that out.

The script would be then:
16c16,19
<             rsync -qa --delete-after --delay-updates out/
"/srv/web/$site/"; \
---
>             rsync -qa --delete-after --delay-updates out/
>             "/srv/web/$site/" && \
>             git add po/*.po && \
>             git commit -m "update POs in $site" && \
>             git push; \


Please, note that I have really no idea if pushing from there is
allowed, even if this is working. It is not the aim of a production
server… Should we add a cron somewhere?
Do you see the advantage of this?

I also though of a way to update POT frequently.
Couldn't we push the pot at each rebuild from the master?
All major changes would always be in an other branch, right? Therefore
there should be no way to avoid POT change from master (from the
translator side). A daily job would also do it.

Here find as attachment a patch proposal (please mind that I wrote it
without test and that I am not a bash guru)

Cheers,

-- 
Kévin Raymond
(Shaiton)
-------------- next part --------------
7a8,18
> 
> function update_pot {
>     site="$1"
>     branch=`git rev-parse --abbrev-ref HEAD`
>     if [[ "$branch" == "master" ]]; then 
>         make pot
>         git add po/$site".pot"
>         git commit -m "POT update in $site"
>         make pushpot
>     fi
> }
16c27,31
<             rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/"; \
---
>             rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/" && \
>             git add po/*.po && \
>             git commit -m "update POs in $site"; && \
>             update_pot $site; && \
>             git push; \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/websites/attachments/20111013/f2a24bbb/attachment.sig>


More information about the websites mailing list