mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Replace should_i_rebuild.sh by a new script that corresponds to what we do in the current cron job nowadays
This commit is contained in:
parent
abddc03b63
commit
63d5700e52
2 changed files with 10 additions and 33 deletions
10
rebuild.sh
Normal file
10
rebuild.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
workdir=$(dirname "$0")
|
||||
log=$workdir/app_list_auto_update.log
|
||||
|
||||
cd $workdir
|
||||
date >> $log
|
||||
git pull >/dev/null
|
||||
|
||||
python ./list_builder.py &>> $log || sendxmpppy "[listbuilder] Rebuilding the application list failed miserably"
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! "$1" ]
|
||||
then
|
||||
echo "I need a github <username>:<token> to run as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
before_pull_commit=$(git show HEAD | head -n 1)
|
||||
|
||||
git pull
|
||||
|
||||
|
||||
if [ "$before_pull_commit" != "$(git show HEAD | head -n 1)" ]
|
||||
then
|
||||
python ./list_builder.py -g $1 apps.json
|
||||
|
||||
# FIXME : this code should probably be moved to "apps.json" nowadays ...
|
||||
python ./update_translations.py official-build.json community-build.json
|
||||
|
||||
for i in official community
|
||||
do
|
||||
if [ "$(git status -s| grep "M locales-$i/en.json")" ]
|
||||
then
|
||||
git add locales-$i/en.json
|
||||
git commit -m "[mod] update locales-$i/en.json with new translations"
|
||||
git pull
|
||||
git push
|
||||
fi
|
||||
done
|
||||
fi
|
Loading…
Add table
Reference in a new issue