Skip to content

Commit 091b8f9

Browse files
committed
post review cleanup
1 parent 2443473 commit 091b8f9

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

admin/build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ set -ex
1717
# - `update-api` to update the scaladoc api symlinks
1818
# In all of the above modes, the `version` needs to be specified.
1919
#
20-
# before_install:
21-
# - export version=2.12.4
22-
# - export mode=archives
20+
# before_install: export version=2.12.N mode=release
2321

2422

2523
# Encryping files (if you need to encrypt a new file but no longer have the secret, create a new

build.sbt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,13 @@ mappings in upload := Seq()
2020

2121
upload := {
2222
import com.amazonaws.{ClientConfiguration, Protocol}
23-
import com.amazonaws.auth.{BasicAWSCredentials, AWSStaticCredentialsProvider, DefaultAWSCredentialsProviderChain}
23+
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain
2424
import com.amazonaws.services.s3.AmazonS3ClientBuilder
2525
import com.amazonaws.services.s3.model.PutObjectRequest
2626
import com.amazonaws.regions.Regions
2727

28-
def env(v: String) = {
29-
val r = System.getenv(v)
30-
assert(r != null, s"Credentials env not specified: $v")
31-
r
32-
}
33-
34-
val awsCreds = new BasicAWSCredentials(env("AWS_ACCESS_KEY_ID"), env("AWS_SECRET_ACCESS_KEY"))
35-
val client = AmazonS3ClientBuilder.standard
36-
.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
37-
.withRegion(Regions.US_EAST_1)
38-
.build
28+
// The standard client picks credentials from AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY env vars
29+
val client = AmazonS3ClientBuilder.standard.withRegion(Regions.US_EAST_1).build
3930

4031
val log = streams.value.log
4132

0 commit comments

Comments
 (0)