Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 189fae7

Browse files
DIOHz0rajsb85
authored andcommitted
ci(report): update script which generate reports
Signed-off-by: Domingo Oropeza <doropeza@teclib.com>
1 parent d73795d commit 189fae7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.atoum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use mageekguy\atoum\writers\std;
55

66
$branch = getenv('TRAVIS_BRANCH');
7-
if ($branch && in_array($branch, ['master', 'develop', 'fetaure/documentation'])) {
7+
if ($branch && in_array($branch, ['develop'])) {
88
$script->addDefaultReport();
99

1010
$coverage = new coverage\html();

.github/publish_changes.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#!/bin/sh
22
# please set the $GH_TOKEN in your travis dashboard
33

4-
if [ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TRAVIS_REPO_SLUG" = "glpi-project/php-library-glpi" ]; then
4+
if [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
55
wget http://get.sensiolabs.org/sami.phar -O "$HOME/bin/sami.phar"
66
# setup_git only for the main repo and not forks
7+
echo "Configuring git user"
78
git config --global user.email "deploy@travis-ci.org"
89
git config --global user.name "Deployment Bot"
10+
echo "adding and fetch a new remote"
911
git remote add upstream https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG".git > /dev/null 2>&1
1012
git fetch upstream
1113

1214
if [ "$TRAVIS_BRANCH" = "develop" ]; then
15+
echo "generating the release"
1316
git stash save -u
1417
vendor/bin/robo publish:release "$TRAVIS_REPO_SLUG" none upstream
1518
git checkout "$TRAVIS_BRANCH"
@@ -18,6 +21,7 @@ if [ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TR
1821

1922
# check if gh-pages exist in remote
2023
if [ "git branch -r --list upstream/gh-pages" ]; then
24+
echo "generating the docs"
2125
# clean the repo and generate the docs
2226
git checkout composer.lock
2327
php $HOME/bin/sami.phar update "$TRAVIS_BUILD_DIR"/.github/samiConfig.php --force
@@ -26,15 +30,18 @@ if [ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TR
2630
find build/tests/coverage/ -type f -name "*.html" -exec sed -i "/report.css/d" "{}" \;
2731

2832
# commit_website_files
33+
echo "adding the reports"
2934
git add build/tests/coverage/*
3035
git add build/docs/*
36+
echo "creating a branch for the new documents"
3137
git checkout -b localCi
3238
git commit -m "changes to be merged"
3339
git checkout -b gh-pages upstream/gh-pages
3440
git checkout localCi build/
3541

3642
# upload_files
37-
git commit --message "docs(*): update code coverage and test result"
43+
echo "pushing the up to date documents"
44+
git commit --message "docs: update tests reports"
3845
git rebase upstream/gh-pages
3946
git push --quiet --set-upstream upstream gh-pages --force
4047
fi

0 commit comments

Comments
 (0)