Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
80f2735e
Commit
80f2735e
authored
Aug 25, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.0.x'
Conflicts: .travis.yml
parents
ddd1b35b
7fc98119
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
ghpages.sh
docs/src/main/asciidoc/ghpages.sh
+16
-8
No files found.
docs/src/main/asciidoc/ghpages.sh
View file @
80f2735e
...
@@ -12,13 +12,20 @@ if ! [ -d docs/target/generated-docs ]; then
...
@@ -12,13 +12,20 @@ if ! [ -d docs/target/generated-docs ]; then
exit
0
exit
0
fi
fi
# Find name of current branch
###################################################################
branch
=
$TRAVIS_BRANCH
[
"
$branch
"
==
""
]
&&
branch
=
`
git rev-parse
--abbrev-ref
HEAD
`
target
=
.
if
[
"
$branch
"
!=
"master"
]
;
then
target
=
./
$branch
;
mkdir
-p
$target
;
fi
# Stash any outstanding changes
# Stash any outstanding changes
###################################################################
###################################################################
git diff-index
--quiet
HEAD
git diff-index
--quiet
HEAD
dirty
=
$?
dirty
=
$?
if
[
"
$dirty
"
!=
"0"
]
;
then
git stash
;
fi
if
[
"
$dirty
"
!=
"0"
]
;
then
git stash
;
fi
# Switch to gh-pages branch to sync it with
master
# Switch to gh-pages branch to sync it with
current branch
###################################################################
###################################################################
git checkout gh-pages
git checkout gh-pages
...
@@ -26,21 +33,22 @@ for f in docs/target/generated-docs/*; do
...
@@ -26,21 +33,22 @@ for f in docs/target/generated-docs/*; do
file
=
${
f
#docs/target/generated-docs/*
}
file
=
${
f
#docs/target/generated-docs/*
}
if
!
git ls-files
-i
-o
--exclude-standard
--directory
|
grep
-q
^
$file$;
then
if
!
git ls-files
-i
-o
--exclude-standard
--directory
|
grep
-q
^
$file$;
then
# Not ignored...
# Not ignored...
cp
-rf
$f
.
cp
-rf
$f
$target
git add
-A
$file
git add
-A
$
target
/
$
file
fi
fi
done
done
git commit
-a
-m
"Sync docs from master to gh-pages"
git add
-A
README.adoc
||
echo
"No change to README.adoc"
git commit
-a
-m
"Sync docs from
$branch
to gh-pages"
||
echo
"Nothing committed"
# Uncomment the following push if you want to auto push to
# Uncomment the following push if you want to auto push to
# the gh-pages branch whenever you commit to
master
locally.
# the gh-pages branch whenever you commit to
branch
locally.
# This is a little extreme. Use with care!
# This is a little extreme. Use with care!
###################################################################
###################################################################
git push origin gh-pages
git push origin gh-pages
||
echo
"Cannot push gh-pages"
# Finally, switch back to the
master
branch and exit block
# Finally, switch back to the
current
branch and exit block
git checkout
master
git checkout
$branch
if
[
"
$dirty
"
!=
"0"
]
;
then
git stash pop
;
fi
if
[
"
$dirty
"
!=
"0"
]
;
then
git stash pop
;
fi
exit
0
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment