forked from lxm_plugin_idea/ADB-Wi-Fi
read SENTRY_DNS value from Environment variable
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -36,6 +36,8 @@ jobs:
|
||||
test:
|
||||
name: Test
|
||||
needs: gradleValidation
|
||||
env:
|
||||
SENTRY_DNS: ${{ secrets.SENTRY_DNS }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -74,6 +76,8 @@ jobs:
|
||||
build:
|
||||
name: Build
|
||||
needs: test
|
||||
env:
|
||||
SENTRY_DNS: ${{ secrets.SENTRY_DNS }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
name: ${{ steps.properties.outputs.name }}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,4 +2,3 @@
|
||||
.idea
|
||||
build
|
||||
.DS_Store
|
||||
sentry.properties
|
||||
|
||||
@@ -3,8 +3,6 @@ import io.gitlab.arturbosch.detekt.Detekt
|
||||
import org.jetbrains.changelog.closure
|
||||
import org.jetbrains.changelog.markdownToHTML
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.FileInputStream
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
// Java support
|
||||
@@ -119,15 +117,7 @@ tasks {
|
||||
writer.println("package dev.polek.adbwifi")
|
||||
writer.println()
|
||||
|
||||
val propertiesFile = file("sentry.properties")
|
||||
val sentryDns = if (propertiesFile.isFile) {
|
||||
val properties = Properties().apply {
|
||||
load(FileInputStream(propertiesFile))
|
||||
}
|
||||
properties["SENTRY_DNS"]
|
||||
} else {
|
||||
null
|
||||
}
|
||||
val sentryDns = System.getenv("SENTRY_DNS")
|
||||
val sentryDnsStr = if (sentryDns != null) "\"$sentryDns\"" else "null"
|
||||
writer.println("val SENTRY_DNS: String? = $sentryDnsStr")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user