Skip to content

Commit 044949c

Browse files
Format shell and batch script generators using trimIndent for consistency and improved readability.
1 parent 18dd886 commit 044949c

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

sample-bots/csharp/build.gradle.kts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ tasks {
2323
@Suppress("UNCHECKED_CAST")
2424
val copyBotFiles = rootProject.extra["copyBotFiles"] as (Path, Path) -> Unit
2525

26-
fun generateShellScript(): String = """#!/bin/sh
27-
if [ ! -d "bin" ]; then
28-
dotnet build
29-
fi
30-
dotnet run --no-build
31-
"""
26+
fun generateShellScript(): String = """
27+
#!/bin/sh
28+
if [ ! -d "bin" ]; then
29+
dotnet build
30+
fi
31+
dotnet run --no-build
32+
""".trimIndent()
3233

33-
fun generateBatchScript(): String = """if not exist bin\ (
34-
dotnet build >nul
35-
)
36-
dotnet run --no-build >nul
37-
"""
34+
fun generateBatchScript(): String = """
35+
if not exist bin\ (
36+
dotnet build >nul
37+
)
38+
dotnet run --no-build >nul
39+
""".trimIndent()
3840

3941
fun createScriptFile(projectDir: Path, botArchivePath: Path, fileExt: String, newLine: String) {
4042
val botName = projectDir.botName()

0 commit comments

Comments
 (0)