summaryrefslogtreecommitdiffstats
path: root/_testing/travis/extract-artefacts.zsh
diff options
context:
space:
mode:
authorAilin Nemui2014-06-16 04:11:29 +0200
committerAilin Nemui2014-06-24 18:28:59 +0200
commitca374a4a1acec99b19486549071ef6c9968b749a (patch)
treeec4f7f7e66b423c392b5dbb46e424ec56a43247c /_testing/travis/extract-artefacts.zsh
parent525b2128888f1e3ca2088a54cc086b102dbfe690 (diff)
downloadscripts.irssi.org-ca374a4a1acec99b19486549071ef6c9968b749a.tar.bz2
Add travis testing to Irssi scripts.
Diffstat (limited to '_testing/travis/extract-artefacts.zsh')
-rwxr-xr-x_testing/travis/extract-artefacts.zsh40
1 files changed, 40 insertions, 0 deletions
diff --git a/_testing/travis/extract-artefacts.zsh b/_testing/travis/extract-artefacts.zsh
new file mode 100755
index 0000000..f383536
--- /dev/null
+++ b/_testing/travis/extract-artefacts.zsh
@@ -0,0 +1,40 @@
+#!/bin/zsh
+if [[ -z $REPO_LOGIN_TOKEN || -z $TRAVIS_REPO_SLUG ]] { exit 1 }
+autoload -Uz zargs
+
+if { ! git clone -b ci-artefacts https://github.com/$TRAVIS_REPO_SLUG artefacts } {
+ mkdir artefacts && git init artefacts
+ pushd artefacts
+ git remote add origin https://github.com/$TRAVIS_REPO_SLUG
+ git checkout -b ci-artefacts
+ popd
+}
+
+pushd artefacts
+git config user.email "scripts@irssi.org"
+git config user.name "Irssi Scripts Helper"
+git config credential.helper store
+
+git rm -qrf .
+
+echo "This branch stores the travis-ci results for $TRAVIS_REPO_SLUG
+See [the testing read-me](../gh-pages/_testing/) for details." > README.markdown
+pushd ..
+MARKDOWN_REPORT=1 ./_testing/report-test.zsh >> artefacts/README.markdown
+popd
+echo >> README.markdown
+echo "$TRAVIS_COMMIT | $TRAVIS_BUILD_NUMBER" >> README.markdown
+
+mv ../Test .
+rm -fr Test/.home
+zargs -r -- Test/*/passed(N) -- rm
+if [[ $USE_ARTEFACTS_CACHE == yes ]] {
+ mv ../old-artefacts/new-changed-info changed-info
+}
+
+git add .
+git commit -q -m "ci artefacts for $TRAVIS_COMMIT
+
+[skip ci]"
+
+git push -u origin ci-artefacts