Factor out 'remoteDocRoot' property

Remote path '/var/www/domains/springframework.org/static/htdocs' is no
longer hard-coded in docs/build.gradle, because (a) it will be needed
in two separate locations as schema uploads are developed, and (b) this
value should be easily editable during local testing.
This commit is contained in:
Chris Beams
2010-11-08 20:39:50 -08:00
parent 5828134799
commit 65b838b5de
2 changed files with 3 additions and 4 deletions

View File

@@ -187,12 +187,10 @@ dependencies {
scpAntTask("org.apache.ant:ant-jsch:1.8.1")
}
checkForProps(taskPath: project.path + ':uploadArchives', requiredProps: ['sshHost', 'sshUsername', 'sshPrivateKey'])
checkForProps(taskPath: project.path + ':uploadArchives', requiredProps: ['sshHost', 'sshUsername', 'sshPrivateKey', 'remoteDocRoot'])
uploadArchives {
def sshHost = project.properties.sshHost
def sshUsername = project.properties.sshUsername
def remoteSiteDir = '/var/www/domains/springframework.org/static/htdocs/' + rootProject.name
def remoteSiteDir = remoteDocRoot + rootProject.name
def docUrl = "http://${sshHost}/${rootProject.name}/docs/${version}"
def remoteDocsDir = "${remoteSiteDir}/docs/"
def fqRemoteDir = "${sshUsername}@${sshHost}:${remoteDocsDir}"

View File

@@ -36,6 +36,7 @@ role=developer
# s3AccessKey=<springsource s3 access key>
# s3SecretAccessKey=<springsource s3 secret access key>
# docsHost=static.springsource.org
# remoteDocRoot=/var/www/domains/springframework.org/static/htdocs
# sshHost=static.springsource.org
# sshUsername=<your user id>
# sshPrivateKey=<path to your ssh private key used for logging into sshHost