@@ -10,7 +10,8 @@ import com.amazonaws.services.s3.model.PutObjectResult
10
10
11
11
// can't call it Universal -- that's taken by the packager
12
12
object ScalaDist {
13
- val upload = TaskKey [Seq [PutObjectResult ]](" s3-upload" ," Uploads files to an S3 bucket." )
13
+ val s3Upload = TaskKey [Seq [PutObjectResult ]](" s3Upload" ," Uploads files to an S3 bucket." )
14
+ val ghUpload = TaskKey [Seq [Unit ]](" ghUpload" ," Uploads files to GitHub Releases." )
14
15
15
16
def createMappingsWith (deps : Seq [(sbt.librarymanagement.ConfigRef , ModuleID , Artifact , File )],
16
17
distMappingGen : (ModuleID , Artifact , File ) => Seq [(File , String )]): Seq [(File , String )] =
@@ -21,30 +22,30 @@ object ScalaDist {
21
22
case _ => Seq ()
22
23
}
23
24
24
- // used to make s3-upload upload the file produced by fileTask to the path scala/$version/${file.name}
25
+ // used to make s3Upload upload the file produced by fileTask to the path scala/$version/${file.name}
25
26
private def uploadMapping (fileTask : TaskKey [File ]) = Def .task {
26
27
val file = fileTask.value
27
28
file -> s " scala/ ${version.value}/ ${file.getName}"
28
29
}
29
30
30
- // make it so that s3-upload will upload the msi when we're running on windows, and everything else when we're on linux
31
- // s3-upload thus depends on the package tasks listed below
31
+ // make it so that s3Upload will upload the msi when we're running on windows, and everything else when we're on linux
32
+ // s3Upload thus depends on the package tasks listed below
32
33
def platformSettings =
33
34
if (sys.props(" os.name" ).toLowerCase(java.util.Locale .US ) contains " windows" )
34
- Wix .settings :+ (upload / mappings += uploadMapping(Windows / packageBin).value)
35
+ Wix .settings :+ (s3Upload / mappings += uploadMapping(Windows / packageBin).value)
35
36
else Unix .settings ++ Seq (
36
- upload / mappings += uploadMapping(Universal / packageBin).value,
37
- upload / mappings += uploadMapping(Universal / packageZipTarball).value,
38
- upload / mappings += uploadMapping(UniversalDocs / packageBin).value,
39
- upload / mappings += uploadMapping(UniversalDocs / packageZipTarball).value,
40
- upload / mappings += uploadMapping(UniversalDocs / packageXzTarball).value,
41
- upload / mappings += uploadMapping(Rpm / packageBin).value,
37
+ s3Upload / mappings += uploadMapping(Universal / packageBin).value,
38
+ s3Upload / mappings += uploadMapping(Universal / packageZipTarball).value,
39
+ s3Upload / mappings += uploadMapping(UniversalDocs / packageBin).value,
40
+ s3Upload / mappings += uploadMapping(UniversalDocs / packageZipTarball).value,
41
+ s3Upload / mappings += uploadMapping(UniversalDocs / packageXzTarball).value,
42
+ s3Upload / mappings += uploadMapping(Rpm / packageBin).value,
42
43
// Debian needs special handling because the value sbt-native-packager
43
44
// gives us for `Debian / packageBin` (coming from the archiveFilename
44
45
// method) includes the debian version and arch information,
45
46
// which we historically have not included. I don't see a way to
46
47
// override the filename on disk, so we re-map at upload time
47
- upload / mappings += Def .task {
48
+ s3Upload / mappings += Def .task {
48
49
(Debian / packageBin).value ->
49
50
s " scala/ ${version.value}/ ${(Debian / name).value}- ${version.value}.deb "
50
51
}.value
0 commit comments