I'd like to setup one simple repository which would contain output from different projects, compiled on Travis CI.
What I can't figure out is the easiest way how to safely push to the repository from the Travis console. If there are two projects building at the same time and both of them happen to push at the same time, one of them will naturally fail with non-updated refs error.
Since paths in each commit are guaranteed to be unique ([project name]/[commit id]) the best I could come up with is a script like this:
while $(git push) not ok {
git pull --rebase
}
Can you think of something better?