You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2023/08/07 14:34:08 UTC

[GitHub] [incubator-pekko-grpc] mdedetrich commented on a diff in pull request #144: Log incase of missing environment variables

mdedetrich commented on code in PR #144:
URL: https://github.com/apache/incubator-pekko-grpc/pull/144#discussion_r1285957905


##########
gradle-plugin/build.gradle:
##########
@@ -51,13 +53,24 @@ publishing {
     }
 }
 
+def getEnvVariable(String value) {
+    String envVar = System.getenv(value)
+    if (envVar == null)
+        project.logger.error("${value} is null")
+    else if (envVar.isEmpty())
+        project.logger.error("${value} is is empty")
+    else if (envVar.isBlank())
+        project.logger.error("${value} is is blank")
+    return envVar
+}
+
 nexusPublishing {
     repositories {
         sonatype {
-            nexusUrl.set(uri("https://repository.apache.org/service/local/"))
-            snapshotRepositoryUrl.set(uri("https://repository.apache.org/content/repositories/snapshots/"))
-            username = System.getenv("NEXUS_USER")
-            password = System.getenv("NEXUS_PW")
+            nexusUrl = uri("https://repository.apache.org/service/local/")

Review Comment:
   The `.set` was part of the kotlin DSL, shouldn't make a difference bet lets use the groovy dsl just not to make things more complicated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org