kbendick commented on a change in pull request #3008:
URL: https://github.com/apache/iceberg/pull/3008#discussion_r696326130
##########
File path: tasks.gradle
##########
@@ -54,6 +54,18 @@ task refreshJavadoc(type: Exec) {
task deploySite(type: Exec) {
workingDir 'site'
Review comment:
If we set `workingDir` as `site`, will the call to `commandLine('rm',
'-rf', 'site')` fail?
##########
File path: tasks.gradle
##########
@@ -54,6 +54,18 @@ task refreshJavadoc(type: Exec) {
task deploySite(type: Exec) {
workingDir 'site'
- commandLine 'mkdocs', 'gh-deploy'
-}
+ def remoteName = 'apache'
+ if (project.hasProperty('remote.name')) {
+ remoteName = project.getProperty('remote.name')
+ }
+ // Normally the site directory is removed and built entirely from the docs
+ // directory when `mkdocs gh-deploy` runs. Removing the site directory,
copying
+ // the file by hand, and using --dirty does basically the same thing, but
allows
+ // us to end up with .asf.yaml in the output that gets copied to the asf-site
+ // branch. That's required for publishing now, which is why this workaround
+ // is necessary.
+ commandLine('rm', '-rf', 'site')
+ commandLine('cp', '../.asf.yaml', 'site/')
+ commandLine('mkdocs', 'gh-deploy', '--dirty', '-r', remoteName)
Review comment:
Ah, if I understand correctly, to use the syntax that @jackye1995
mentioned, there would need to be only one call to `commandLine`, such as
`commandLine 'rm' '-rf' 'site' '&&' 'cp' '.....'`.
If we'd have to put `'&&'` into the list (which I suspect we would as I
imagine they're all string joined on a space), then I would vote for keeping it
the way @cwsteinbach has it now (even if the syntax is slightly different from
the existing ones).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]