somehow pagure says I merged this commit but it also says it never happened. This was PR 447

This commit is contained in:
Stephen Smoogen
2021-03-24 08:40:34 -04:00
parent a4b5dfce5b
commit 5deff9066d
4 changed files with 4 additions and 107 deletions

View File

@@ -1,2 +0,0 @@
MAILTO=web-members@fedoraproject.org
0 * * * * apache /usr/local/bin/lock-wrapper syncTranslations /usr/local/bin/syncTranslations.sh | /usr/local/bin/nag-once syncTranslations 1d 2>&1

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# this script pull all translations from the zanata Websites project.
# It pulls every resources.
PO_DIR=/var/tmp/po_dir
SITES="alt.fedoraproject.org \
fedoracommunity.org \
fedorahosted.org \
fedoraproject.org \
getfedora.org \
flocktofedora.org \
spins.fedoraproject.org \
labs.fedoraproject.org \
arm.fedoraproject.org \
start.fedoraproject.org"
# hack for zanata-client, since it currently only is able to find
# config file in ~/.config/zanata.ini and apache's $HOME isn't a good location
export HOME=/var/lib/zanata
[ -d $PO_DIR ] || mkdir $PO_DIR
for site in $SITES
do
[ -d $PO_DIR/$site ] || mkdir -p $PO_DIR/$site
cp $HOME/sample.xml $PO_DIR/$site/zanata.xml
sed -i "s/@VERSION@/$site/" $PO_DIR/$site/zanata.xml
cd $PO_DIR/$site
zanata pull
done

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# this script pull all translations from the zanata Websites project.
# It pulls every resources.
PO_DIR=/var/tmp/po_dir
SITES="alt.fedoraproject.org \
fedoracommunity.org \
fedorahosted.org \
fedoraproject.org \
getfedora.org \
flocktofedora.org \
spins.fedoraproject.org \
labs.fedoraproject.org \
arm.fedoraproject.org \
start.fedoraproject.org"
# hack for zanata-client, since it currently only is able to find
# config file in ~/.config/zanata.ini and apache's $HOME isn't a good location
export HOME=/var/lib/zanata
[ -d $PO_DIR ] || mkdir $PO_DIR
for site in $SITES
do
[ -d $PO_DIR/$site ] || mkdir -p $PO_DIR/$site
cp $HOME/sample.xml $PO_DIR/$site/zanata.xml
sed -i "s/@VERSION@/$site/" $PO_DIR/$site/zanata.xml
cd $PO_DIR/$site
zanata pull
done

View File

@@ -7,7 +7,6 @@
- python-feedparser
- python-genshi
- python-setuptools
- zanata-python-client
tags:
- packages
- fedora-web
@@ -59,45 +58,7 @@
- fedora-web
when: env == 'staging'
- name: Copy syncStatic script (stg)
when: env == "staging"
copy: >
src=syncStatic.stg.sh dest=/usr/local/bin/syncStatic owner=root group=root
mode=0755
tags:
- fedora-web
- name: Copy syncStatic script (prod)
when: env == "production"
copy: >
src=syncStatic.sh dest=/usr/local/bin/syncStatic owner=root group=root
mode=0755
tags:
- fedora-web
- name: Copy syncTranslations script (stg)
when: env == "staging"
copy: >
src=syncTranslations.stg.sh dest=/usr/local/bin/syncTranslations.sh owner=root
group=root mode=0755
tags:
- fedora-web
- name: Copy syncTranslations script (prod)
when: env == "production"
copy: >
src=syncTranslations.sh dest=/usr/local/bin/syncTranslations.sh owner=root
group=root mode=0755
tags:
- fedora-web
- name: Install the syncStatic and syncTranslations cronjobs
copy: >
src={{item}}.cron dest=/etc/cron.d/{{item}}.cron
owner=root group=root mode=0644
with_items:
- syncStatic
- syncTranslations
tags:
- fedora-web
- cron
- name: Remove the syncTranslations cronjob
file:
path: /etc/cron.d/syncTranslations.cron
state: absent