Skip to content

Commit f623db7

Browse files
committed
Added script to publish build results
1 parent dffae7e commit f623db7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

publish-build-results.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
reportsDir=build/reports
4+
resourceDir=Resources
5+
6+
#Publish build results
7+
echo '--------------------------------------------------------------------------------'
8+
echo 'Publishing build results'
9+
echo '--------------------------------------------------------------------------------'
10+
11+
git remote add origin [email protected]:appsquickly/TyphoonRestClient.git || true # allow `remote add` to fail without failing script
12+
git remote set-url origin [email protected]:appsquickly/TyphoonRestClient.git
13+
git fetch origin gh-pages:gh-pages
14+
git fetch origin gh-pages
15+
git stash
16+
git checkout gh-pages
17+
git branch --set-upstream-to=origin/gh-pages gh-pages
18+
git pull
19+
ditto build/reports/build-status/build-status.png ./build-status/build-status.png
20+
git add build-status
21+
22+
rm -fr ./docs/latest/api
23+
cp -fr ${reportsDir}/api ./docs/latest/api
24+
git add docs/latest/api
25+
26+
git commit -a -m "publish reports to gh-pages" || true # allow `remote add` to fail without failing script (if nothing to add)
27+
git push -u origin gh-pages
28+
git checkout master
29+
git pull

0 commit comments

Comments
 (0)