mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-09 11:53:30 +00:00
Minor tinkering with build upload tasks.
This commit is contained in:
parent
0c09780644
commit
5a4c81a2a5
14
build.gradle
14
build.gradle
@ -87,9 +87,12 @@ task login {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define remoteSiteDir and sshHost in gradle.properties
|
||||||
|
def remoteDocsDir="$remoteSiteDir/docs/3.1.x"
|
||||||
|
|
||||||
task uploadApidocs(dependsOn: login) << {
|
task uploadApidocs(dependsOn: login) << {
|
||||||
ant {
|
ant {
|
||||||
scp(file: apitar.archivePath, todir: "$login.username@$sshHost:$remoteDocsDir", password: login.password)
|
scp(file: apitar.archivePath, todir: "$login.username@$sshHost:$remoteSiteDir/$remoteDocsDir", password: login.password)
|
||||||
sshexec(host: sshHost, username: login.username, password: login.password, command: "cd $remoteDocsDir && tar -xjf ${apitar.archiveName}")
|
sshexec(host: sshHost, username: login.username, password: login.password, command: "cd $remoteDocsDir && tar -xjf ${apitar.archiveName}")
|
||||||
sshexec(host: sshHost, username: login.username, password: login.password, command: "rm $remoteDocsDir/${apitar.archiveName}")
|
sshexec(host: sshHost, username: login.username, password: login.password, command: "rm $remoteDocsDir/${apitar.archiveName}")
|
||||||
}
|
}
|
||||||
@ -131,6 +134,7 @@ task uploadDist(type: UploadDist) {
|
|||||||
archiveFile = dist.archivePath
|
archiveFile = dist.archivePath
|
||||||
shaFile = "${dist.archivePath}.sha1" as File
|
shaFile = "${dist.archivePath}.sha1" as File
|
||||||
archiveName = dist.archiveName
|
archiveName = dist.archiveName
|
||||||
|
classpath = configurations.antlibs
|
||||||
}
|
}
|
||||||
|
|
||||||
def getJavaProjects() {
|
def getJavaProjects() {
|
||||||
@ -168,14 +172,18 @@ class UploadDist extends DefaultTask {
|
|||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
def upload() {
|
def upload() {
|
||||||
|
def accessKey = project.s3AccessKey
|
||||||
|
def secretKey = project.s3SecretAccessKey
|
||||||
|
def version = project.version
|
||||||
|
|
||||||
project.ant {
|
project.ant {
|
||||||
taskdef(resource: 'org/springframework/build/aws/ant/antlib.xml', classpath: classpath.asPath)
|
taskdef(resource: 'org/springframework/build/aws/ant/antlib.xml', classpath: classpath.asPath)
|
||||||
s3(accessKey: project.s3AccessKey, secretKey: project.s3SecretAccessKey) {
|
s3(accessKey: accessKey, secretKey: secretKey) {
|
||||||
upload(bucketName: 'dist.springframework.org', file: archiveFile,
|
upload(bucketName: 'dist.springframework.org', file: archiveFile,
|
||||||
toFile: releaseType() + "/SEC/${archiveName}", publicRead: 'true') {
|
toFile: releaseType() + "/SEC/${archiveName}", publicRead: 'true') {
|
||||||
metadata(name: 'project.name', value: 'Spring Security')
|
metadata(name: 'project.name', value: 'Spring Security')
|
||||||
metadata(name: 'release.type', value: releaseType())
|
metadata(name: 'release.type', value: releaseType())
|
||||||
metadata(name: 'bundle.version', value: project.version)
|
metadata(name: 'bundle.version', value: version)
|
||||||
metadata(name: 'package.file.name', value: archiveName)
|
metadata(name: 'package.file.name', value: archiveName)
|
||||||
}
|
}
|
||||||
upload(bucketName: 'dist.springframework.org', file: shaFile,
|
upload(bucketName: 'dist.springframework.org', file: shaFile,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user