From 63d5700e52baed80378204841a55f5287541e16d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 20 Mar 2020 18:37:29 +0100 Subject: [PATCH] Replace should_i_rebuild.sh by a new script that corresponds to what we do in the current cron job nowadays --- rebuild.sh | 10 ++++++++++ should_i_rebuild.sh | 33 --------------------------------- 2 files changed, 10 insertions(+), 33 deletions(-) create mode 100644 rebuild.sh delete mode 100644 should_i_rebuild.sh diff --git a/rebuild.sh b/rebuild.sh new file mode 100644 index 00000000..dfe9bec9 --- /dev/null +++ b/rebuild.sh @@ -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" diff --git a/should_i_rebuild.sh b/should_i_rebuild.sh deleted file mode 100644 index a70f12b8..00000000 --- a/should_i_rebuild.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -ex - -if [ ! "$1" ] -then - echo "I need a github : 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