Skip to content

Commit

Permalink
Support for windows users (#15475)
Browse files Browse the repository at this point in the history
* unsigned commits into a single signed one, force push

* Update call to get kotlin version

---------

Co-authored-by: Joel Biskie <[email protected]>
Co-authored-by: Joel Biskie <[email protected]>
  • Loading branch information
3 people authored Sep 20, 2024
1 parent 1ea31f5 commit 3035aac
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 20 deletions.
33 changes: 18 additions & 15 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Normal text let sit to auto
*.htm text
*.html text
*.css text
*.js text

## Declare files that will always have LF (aka \n aka 10 aka 0x0a) line endings on checkout.
*.sh text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.csv text eol=lf
*.hl7 text eol=lf
.environment/sftp-conf/ssh_host_*_key text eol=lf

# Normal text let sit to auto
*.htm text
*.html text
*.css text
*.js text

## Declare files that will always have LF (aka \n aka 10 aka 0x0a) line endings on checkout.
*.sh text eol=lf
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.csv text eol=lf
*.hl7 text eol=lf
.environment/sftp-conf/ssh_host_*_key text eol=lf
* text=auto
*.gradle text eol=lf


2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kotlin {
}

dependencies {
val kotlinVersion by System.getProperties()
val kotlinVersion = KotlinVersion.CURRENT.toString()
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
implementation("org.jlleitschuh.gradle.ktlint:org.jlleitschuh.gradle.ktlint.gradle.plugin:12.1.1")
}
15 changes: 12 additions & 3 deletions prime-router/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,19 @@ task<Exec>("uploadSwaggerUI") {
}

tasks.register("killFunc") {
exec {
workingDir = project.rootDir
doLast {
val processName = "func"
commandLine = listOf("sh", "-c", "pkill -9 $processName || true")
if (org.gradle.internal.os.OperatingSystem.current().isWindows) {
exec {
workingDir = project.rootDir
commandLine = listOf("cmd", "/c", "taskkill /F /IM $processName.exe || exit 0")
}
} else {
exec {
workingDir = project.rootDir
commandLine = listOf("sh", "-c", "pkill -9 $processName || true")
}
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion prime-router/src/test/kotlin/cli/ValidateYMLCommandTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ class ValidateYMLCommandTests {
"--type organizations --dir src/test/resources/yaml_validation/failure/recursive",
ansiLevel = AnsiLevel.TRUECOLOR
)
val outputNormalized = result.stdout.replace("\\", "/")

assertThat(result.stdout).contains(
assertThat(outputNormalized).contains(
"src/test/resources/yaml_validation/failure/recursive contains no YAML files!"
)
assertThat(result.stderr).contains("No YAML files being validated!")
Expand Down

0 comments on commit 3035aac

Please sign in to comment.