syncStatic script update proposal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)
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; \

Attachment: pgp8c8EKkwAAM.pgp
Description: PGP signature

-- 
websites mailing list
websites@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/websites

[Index of Archives]     [Fedora Users]     [Linux ARM]     [ARM Kernel]     [Older Fedora Users]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux