blob: 98bd34b51d8a8c9bca7077ce7a8cce88589baeae (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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](../master/_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
 |