tTravis: Check if icons and locales are up to date on release - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 46fcf686b1ec8603d240b718a644d9e188ca9f1a
DIR parent 7218bf1d14f963c7f35cb6649677ef4eee4cfa20
HTML Author: Johann Bauer <bauerj@bauerj.eu>
Date: Mon, 28 May 2018 23:10:32 +0200
Travis: Check if icons and locales are up to date on release
Diffstat:
M .travis.yml | 9 +++++++++
A contrib/deterministic-build/check_… | 36 +++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
---
DIR diff --git a/.travis.yml b/.travis.yml
t@@ -48,3 +48,11 @@ jobs:
script: ./contrib/build-osx/make_osx
after_script: ls -lah dist && md5 dist/*
after_success: true
+ - stage: release check
+ install:
+ - git fetch --all --tags
+ - git fetch origin --unshallow
+ script:
+ - ./contrib/deterministic-build/check_submodules.sh
+ after_success: true
+ if: tag IS present
+\ No newline at end of file
DIR diff --git a/contrib/deterministic-build/check_submodules.sh b/contrib/deterministic-build/check_submodules.sh
t@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+here=$(dirname "$0")
+test -n "$here" -a -d "$here" || exit
+
+cd ${here}/../..
+
+git submodule init
+git submodule update
+
+function get_git_mtime {
+ if [ $# -eq 1 ]; then
+ git log --pretty=%at -n1 -- $1
+ else
+ git log --pretty=%ar -n1 -- $2
+ fi
+}
+
+fail=0
+
+for f in icons/* "icons.qrc"; do
+ if (( $(get_git_mtime "$f") > $(get_git_mtime "contrib/deterministic-build/electrum-icons/") )); then
+ echo "Modification time of $f (" $(get_git_mtime --readable "$f") ") is newer than"\
+ "last update of electrum-icons"
+ fail=1
+ fi
+done
+
+if [ $(date +%s -d "2 weeks ago") -gt $(get_git_mtime "contrib/deterministic-build/electrum-locale/") ]; then
+ echo "Last update from electrum-locale is older than 2 weeks."\
+ "Please update it to incorporate the latest translations from crowdin."
+ fail=1
+fi
+
+exit ${fail}
+\ No newline at end of file