Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c34ed5

Browse files
committed
Display all the commands that will be executed post documentation
1 parent 63d9ddb commit 9c34ed5

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

gradle/documentation.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,7 @@ task publishDocs(type: Exec) {
7070
"""
7171
}
7272

73-
if (buildInfo.dryRun) {
74-
logger.info("Will run the following command:")
75-
logger.info(gitChanges)
76-
commandLine "sh", "-c", "echo This is a dry run"
77-
return
78-
}
79-
80-
commandLine "sh", "-c",
81-
"""
73+
def commands = """
8274
git config --local user.email "[email protected]"
8375
git config --local user.name "Springfox Robot"
8476
git fetch origin +gh-pages:gh-pages
@@ -90,6 +82,15 @@ task publishDocs(type: Exec) {
9082
git config --local --unset user.email
9183
git config --local --unset user.name
9284
"""
85+
86+
if (buildInfo.dryRun) {
87+
logger.info("Will run the following command:")
88+
logger.info(commands)
89+
commandLine "sh", "-c", "echo This is a dry run"
90+
return
91+
}
92+
93+
commandLine "sh", "-c", commands
9394
}
9495

9596
def isSnapshot(project) {

0 commit comments

Comments
 (0)