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
39c66cfe
Unverified
Commit
39c66cfe
authored
Aug 17, 2016
by
Marcin Grzejszczak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating ghpages for all projects
parent
4552b33a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
ghpages.sh
docs/src/main/asciidoc/ghpages.sh
+17
-11
No files found.
docs/src/main/asciidoc/ghpages.sh
View file @
39c66cfe
...
...
@@ -27,9 +27,23 @@ fi
# Prop that will let commit the changes
COMMIT_CHANGES
=
"no"
MAVEN_PATH
=
${
MAVEN_PATH
:-}
echo
"Path to Maven is [
${
MAVEN_PATH
}
]"
# Code getting the name of the current branch. For master we want to publish as we did until now
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
# If there is a branch already passed will reuse it - otherwise will try to find it
CURRENT_BRANCH
=
${
BRANCH
}
if
[[
-z
"
${
CURRENT_BRANCH
}
"
]]
;
then
CURRENT_BRANCH
=
$(
git symbolic-ref
-q
HEAD
)
CURRENT_BRANCH
=
${
CURRENT_BRANCH
##refs/heads/
}
CURRENT_BRANCH
=
${
CURRENT_BRANCH
:-
HEAD
}
fi
echo
"Current branch is [
${
CURRENT_BRANCH
}
]"
git checkout
${
CURRENT_BRANCH
}
# Get the name of the `docs.main` property
MAIN_ADOC_VALUE
=
$(
mvn
-q
\
MAIN_ADOC_VALUE
=
$(
"
${
MAVEN_PATH
}
"
mvn
-q
\
-Dexec
.executable
=
"echo"
\
-Dexec
.args
=
'${docs.main}'
\
--non-recursive
\
...
...
@@ -38,7 +52,7 @@ echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]"
# Get whitelisted branches - assumes that a `docs` module is available under `docs` profile
WHITELIST_PROPERTY
=
"docs.whitelisted.branches"
WHITELISTED_BRANCHES_VALUE
=
$(
mvn
-q
\
WHITELISTED_BRANCHES_VALUE
=
$(
"
${
MAVEN_PATH
}
"
mvn
-q
\
-Dexec
.executable
=
"echo"
\
-Dexec
.args
=
"
\$
{
${
WHITELIST_PROPERTY
}
}"
\
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec
\
...
...
@@ -46,17 +60,9 @@ WHITELISTED_BRANCHES_VALUE=$(mvn -q \
-pl
docs
)
echo
"Extracted '
${
WHITELIST_PROPERTY
}
' from Maven build [
${
WHITELISTED_BRANCHES_VALUE
}
]"
# Code getting the name of the current branch. For master we want to publish as we did until now
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
CURRENT_BRANCH
=
$(
git symbolic-ref
-q
HEAD
)
CURRENT_BRANCH
=
${
CURRENT_BRANCH
##refs/heads/
}
CURRENT_BRANCH
=
${
CURRENT_BRANCH
:-
HEAD
}
echo
"Current branch is [
${
CURRENT_BRANCH
}
]"
# Stash any outstanding changes
###################################################################
git diff-index
--quiet
HEAD
dirty
=
$?
git diff-index
--quiet
HEAD
&&
dirty
=
$?
||
(
echo
"Failed to check if the current repo is dirty. Assuming that it is."
&&
dirty
=
"1"
)
if
[
"
$dirty
"
!=
"0"
]
;
then
git stash
;
fi
# Switch to gh-pages branch to sync it with master
...
...
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