diff --git a/docs/1.0.x/ghpages.sh b/docs/1.0.x/ghpages.sh index 62a5b3db..4f7f53e7 100644 --- a/docs/1.0.x/ghpages.sh +++ b/docs/1.0.x/ghpages.sh @@ -1,8 +1,8 @@ #!/bin/bash -x -git remote add docs https://github.com/spring-projects/spring-cloud +git remote | grep docs || git remote add docs https://github.com/spring-cloud/spring-cloud-static -if ! (git fetch docs && git checkout --track docs/gh-pages); then +if ! (git fetch docs && git checkout --track docs/gh-pages || git checkout gh-pages); then echo "No gh-pages, error" exit 1 fi @@ -22,16 +22,18 @@ if [ "$dirty" != "0" ]; then git stash; fi ################################################################### git checkout gh-pages +mkdir -p docs/1.0.x + for f in target/generated-docs/*; do file=${f#target/generated-docs/*} if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then # Not ignored... - cp -rf $f . - git add -A $file + cp -rf $f docs/1.0.x + git add -A docs/1.0.x/$file fi done -git commit -a -m "Sync docs from master to gh-pages" +git commit -a -m "Sync docs from 1.0.x to gh-pages" # Uncomment the following push if you want to auto push to # the gh-pages branch whenever you commit to master locally. @@ -40,7 +42,7 @@ git commit -a -m "Sync docs from master to gh-pages" git push docs gh-pages || exit 1 # Finally, switch back to the master branch and exit block -git checkout master +git checkout 1.0.x if [ "$dirty" != "0" ]; then git stash pop; fi exit 0 diff --git a/docs/1.0.x/spring-cloud.html b/docs/1.0.x/spring-cloud.html index d579c0b6..eca388bf 100644 --- a/docs/1.0.x/spring-cloud.html +++ b/docs/1.0.x/spring-cloud.html @@ -4,13 +4,13 @@ - + Spring Cloud - +