summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-18 07:57:17 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-18 08:00:01 +0300
commit27d78b81bc7e5c7f17389e3ed8f1dc8eab0cf4ee (patch)
tree188bde0f43a2e80207752ba501952ecb49977b49 /tools
parent74701b17fc28be2a9d293760dcb0935d4d45a006 (diff)
downloadManaVerse-27d78b81bc7e5c7f17389e3ed8f1dc8eab0cf4ee.tar.gz
ManaVerse-27d78b81bc7e5c7f17389e3ed8f1dc8eab0cf4ee.tar.bz2
ManaVerse-27d78b81bc7e5c7f17389e3ed8f1dc8eab0cf4ee.tar.xz
ManaVerse-27d78b81bc7e5c7f17389e3ed8f1dc8eab0cf4ee.zip
Add gitstatsh ci script for git stats [ci skip]
Diffstat (limited to 'tools')
-rw-r--r--tools/ci/branches/ci_site/.gitlab-ci.yml19
-rwxr-xr-xtools/ci/jobs/gitstatsh.sh22
-rwxr-xr-xtools/ci/jobs/pages.sh2
3 files changed, 43 insertions, 0 deletions
diff --git a/tools/ci/branches/ci_site/.gitlab-ci.yml b/tools/ci/branches/ci_site/.gitlab-ci.yml
index fa358cbcc..ab429ac48 100644
--- a/tools/ci/branches/ci_site/.gitlab-ci.yml
+++ b/tools/ci/branches/ci_site/.gitlab-ci.yml
@@ -103,6 +103,24 @@ gitstats:
tags:
- docker
+gitstatsh:
+ stage: build
+ script:
+ - ./tools/ci/scripts/clonesrc.sh
+ - cd manaplus
+ - ./tools/ci/jobs/gitstatsh.sh
+ artifacts:
+ paths:
+ - manaplus/stats2
+ expire_in: 3 week
+ when: always
+ dependencies: []
+ variables:
+ GIT_DEPTH: "100000"
+ PACKAGES: git-core python python-pip zlib1g
+ tags:
+ - docker
+
# stats
pages:
@@ -117,6 +135,7 @@ pages:
dependencies:
- doxygen
- gitstats
+ - gitstatsh
- gcc-7_tests_gcov
- gcc-7_sdl2_tests_gcov
variables:
diff --git a/tools/ci/jobs/gitstatsh.sh b/tools/ci/jobs/gitstatsh.sh
new file mode 100755
index 000000000..4537920e4
--- /dev/null
+++ b/tools/ci/jobs/gitstatsh.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+export LOGFILE=gitstatsh.log
+
+source ./tools/ci/scripts/init.sh
+
+tools/ci/scripts/retry.sh pip install pandas
+check_error $?
+tools/ci/scripts/retry.sh pip install yattag
+check_error $?
+tools/ci/scripts/retry.sh git clone https://github.com/gzc/gitstats.git gitstatsh
+check_error $?
+git log --stat --no-merges --summary --decorate=false >repo_log
+check_error $?
+cd gitstatsh/v1
+python main.py ManaPlus ../../repo_log
+check_error $?
+mv web ../../stats2
+check_error $?
+cd ../..
+check_error $?
+ls -la
diff --git a/tools/ci/jobs/pages.sh b/tools/ci/jobs/pages.sh
index 720a3f917..756b1c07d 100755
--- a/tools/ci/jobs/pages.sh
+++ b/tools/ci/jobs/pages.sh
@@ -8,6 +8,7 @@ tools/ci/scripts/retry.sh git clone https://gitlab.com/4144/pagesindexgen.git pa
mkdir -p ../public/docs
mkdir -p ../public/stats
+mkdir -p ../public/stats2
mkdir -p ../public/gcov
mkdir -p ../public/version
@@ -25,3 +26,4 @@ check_error $?
cd ..
cp -r ./doxygen/html/* ../public/docs || exit 1
cp -r ./stats/* ../public/stats || exit 1
+cp -r ./stats2/* ../public/stats2 || exit 1