From 57ed76cd501e1d0d82b8c10644b78c8ef807fa46 Mon Sep 17 00:00:00 2001 From: darksun Date: Wed, 24 Oct 2018 22:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试通过,还原检查 --- .travis.yml | 9 ++++ scripts/badge.sh | 10 ++++ scripts/badge/show_status.sh | 92 ++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100755 scripts/badge.sh create mode 100755 scripts/badge/show_status.sh diff --git a/.travis.yml b/.travis.yml index 1bea11af3d..26ca1955e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,12 @@ language: c script: - sh ./scripts/check.sh + - ./scripts/badge.sh + +deploy: + provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN + local_dir: build + on: + branch: master diff --git a/scripts/badge.sh b/scripts/badge.sh new file mode 100755 index 0000000000..fd3070c7dc --- /dev/null +++ b/scripts/badge.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# 重新生成badge +set -o errexit + +SCRIPTS_DIR=$(cd $(dirname "$0") && pwd) +BUILD_DIR=$(cd $SCRIPTS_DIR/.. && pwd)/build +mkdir -p ${BUILD_DIR}/badge +for catalog in published translated translating sources;do + ${SCRIPTS_DIR}/badge/show_status.sh -s ${catalog} > ${BUILD_DIR}/badge/${catalog}.svg +done diff --git a/scripts/badge/show_status.sh b/scripts/badge/show_status.sh new file mode 100755 index 0000000000..aab852b486 --- /dev/null +++ b/scripts/badge/show_status.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +set -e + +function help() +{ + cat < + + + + + + + + + + + + + + ${comment} + ${comment} + ${num} + ${num} + + +EOF + else + cat<