forked from bbstilson/sbt-codeartifact
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99e7a8b
commit fe3b082
Showing
1 changed file
with
28 additions
and
28 deletions.
There are no files selected for viewing
56 changes: 28 additions & 28 deletions
56
sbt-codeartifact/src/sbt-test/sbt-codeartifact/appends-creds/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
name := "resolver-test" | ||
scalaVersion := "2.13.5" | ||
|
||
// This is a real url, and it must be, but only I'll be able to | ||
// use it since only I have the aws creds to get an auth token. | ||
val repoUrl = "https://bbstilson-968410040515.d.codeartifact.us-west-2.amazonaws.com/maven/test/" | ||
|
||
codeArtifactUrl := repoUrl | ||
// Adding the same repo again. | ||
// We should see the same credentials and resolvers twice. | ||
codeArtifactResolvers := List(repoUrl) | ||
|
||
lazy val checkResolversAndCredentials = taskKey[Unit]( | ||
"Ensures that resolvers and credentials are added for the" + | ||
"codeArtifactUrl repo and any repos added via codeArtifactResolvers." | ||
) | ||
|
||
checkResolversAndCredentials := { | ||
val repos = resolvers.value.map(_.name) | ||
val creds = credentials.value.map(_.toString()) | ||
|
||
assert(repos.size == 2, "CodeArtifact resolvers were not added.") | ||
assert(creds.size == 2, "CodeArtifact credentials were not added.") | ||
assert(creds.head == creds.last, "Credentials did not match.") | ||
assert(repos.head == repos.last, "Resolvers did not match.") | ||
|
||
streams.value.log.success("Added credentials and resolvers.") | ||
} | ||
//name := "resolver-test" | ||
//scalaVersion := "2.13.5" | ||
// | ||
//// This is a real url, and it must be, but only I'll be able to | ||
//// use it since only I have the aws creds to get an auth token. | ||
//val repoUrl = "https://bbstilson-968410040515.d.codeartifact.us-west-2.amazonaws.com/maven/test/" | ||
// | ||
//codeArtifactUrl := repoUrl | ||
//// Adding the same repo again. | ||
//// We should see the same credentials and resolvers twice. | ||
//codeArtifactResolvers := List(repoUrl) | ||
// | ||
//lazy val checkResolversAndCredentials = taskKey[Unit]( | ||
// "Ensures that resolvers and credentials are added for the" + | ||
// "codeArtifactUrl repo and any repos added via codeArtifactResolvers." | ||
//) | ||
// | ||
//checkResolversAndCredentials := { | ||
// val repos = resolvers.value.map(_.name) | ||
// val creds = credentials.value.map(_.toString()) | ||
// | ||
// assert(repos.size == 2, "CodeArtifact resolvers were not added.") | ||
// assert(creds.size == 2, "CodeArtifact credentials were not added.") | ||
// assert(creds.head == creds.last, "Credentials did not match.") | ||
// assert(repos.head == repos.last, "Resolvers did not match.") | ||
// | ||
// streams.value.log.success("Added credentials and resolvers.") | ||
//} |