From 65b838b5defd8a873e5138ab296436c0f12ccbd9 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Mon, 8 Nov 2010 20:39:50 -0800 Subject: [PATCH] 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. --- docs/build.gradle | 6 ++---- gradle.properties | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/build.gradle b/docs/build.gradle index 0c2b368f33..221abb5d16 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -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}" diff --git a/gradle.properties b/gradle.properties index bdd574521c..4a026608fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -36,6 +36,7 @@ role=developer # s3AccessKey= # s3SecretAccessKey= # docsHost=static.springsource.org +# remoteDocRoot=/var/www/domains/springframework.org/static/htdocs # sshHost=static.springsource.org # sshUsername= # sshPrivateKey=