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<