From: Luc Sarzyniec Date: Sat, 2 Apr 2022 10:40:42 +0000 (+0200) Subject: Compress big files before adding them to git as GitHub prevent to push files bigger... X-Git-Tag: 2022-04-02~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc1cc69abc43968c1d0ce2dbc1a4010192bd65ba;p=thirdparty%2Fut1-blacklists.git Compress big files before adding them to git as GitHub prevent to push files bigger than 100M --- diff --git a/scripts/sync-git b/scripts/sync-git index b1ef71fa..15371f46 100755 --- a/scripts/sync-git +++ b/scripts/sync-git @@ -3,11 +3,15 @@ GIT_REMOTE="https://${GITHUB_TOKEN}@github.com/olbat/ut1-blacklists" GIT_BRANCH="master" -set -e -set -x +set -euxo pipefail -# if there is some changes in the repository: commit, tag and push them +# compress files that are bigger than 100M as GitHub doesn't allow to +# push files of that size anymore +find blacklists -type f -size +99M -exec gzip -nf {} \; + +# if there are some changes in the repository: commit, tag and push them git add -N blacklists/ + if ! git diff --exit-code -- . ':!blacklists/README' > /dev/null # (do not take in account changes that only affects the blacklists/README file # since this file is updated every day with the date)