33# source helper functions
44source ci/ci-functions.sh
55
6- # thank you https://stackoverflow.com/a/47441734
7- # this is requried to be able to checkout branches after fetching
8- test git config remote.origin.fetch +refs/heads/* :refs/remotes/origin/*
9- test git fetch origin deployment
10-
116# TODO make test() work with | pipe
127cat ci/deploy-whitelist | xargs git add -f
138# commit generated files if necessary, it's ok if commit fails
14- git commit -m temporary- commit
9+ git commit -m " temporary commit"
1510# move to deployment branch
1611test git checkout deployment
1712test rm -rf *
@@ -22,19 +17,3 @@ cat ci/deploy-whitelist | xargs git checkout HEAD@{1}
2217test git --no-pager diff --staged
2318# unstage the whitelist
2419test git rm -f ci/deploy-whitelist
25-
26- if [ " ${TRAVIS} " == " true" ]; then
27- test git config user.email " support@bluerobotics.com"
28- test git config user.name " BlueRobotics-CI"
29- fi
30-
31- git commit -m " update autogenerated files for $( git rev-parse HEAD@{2}) " || return 0
32-
33- # deploy
34- if [ ! -z ${TRAVIS_PULL_REQUEST} ] && [ ${TRAVIS_PULL_REQUEST} == " false" ]; then
35- echob " Updating deployment branch.."
36- test git remote set-url origin https://${GITHUB_TOKEN} @github.com/bluerobotics/ping-python
37- test git push origin
38- else
39- echob " PR detected, no deployment will be done."
40- fi
0 commit comments