Skip to content

Commit 6e1fa46

Browse files
committed
removed git pre-commit hook, as this will be handled on github itself
1 parent aa24b45 commit 6e1fa46

File tree

2 files changed

+0
-47
lines changed

2 files changed

+0
-47
lines changed

core/build.gradle.kts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -168,41 +168,9 @@ tasks.withType<KorroTask> {
168168
dependsOn(copySamplesOutputs)
169169
}
170170

171-
// This task installs the pre-commit hook to the local machine the first time the project is built
172-
// The pre-commit hook contains the command to run processKDocsMain before each commit
173-
val installGitPreCommitHook by tasks.creating(Copy::class) {
174-
doNotTrackState(/* reasonNotToTrackState = */ "Fails on TeamCity otherwise.")
175-
176-
val gitHooksDir = File(rootProject.rootDir, ".git/hooks")
177-
if (gitHooksDir.exists()) {
178-
from(File(rootProject.rootDir, "gradle/scripts/pre-commit"))
179-
into(gitHooksDir)
180-
fileMode = 755
181-
182-
// Workaround for https://github.com/Kotlin/dataframe/issues/612
183-
if (OSType.identify() in listOf(OSType.Mac, OSType.Linux)) doLast {
184-
exec {
185-
workingDir(gitHooksDir)
186-
commandLine("chmod", "755", "pre-commit")
187-
}
188-
}
189-
} else {
190-
logger.lifecycle("'.git/hooks' directory not found. Skipping installation of pre-commit hook.")
191-
}
192-
}
193-
tasks.named("assemble") {
194-
dependsOn(installGitPreCommitHook)
195-
}
196-
197171
// region docPreprocessor
198172

199-
// This task is used to add all generated sources (from processKDocsMain) to git
200173
val generatedSourcesFolderName = "generated-sources"
201-
val addGeneratedSourcesToGit by tasks.creating(GitTask::class) {
202-
directory.set(file("."))
203-
command.set("add")
204-
args.set(listOf("-A", generatedSourcesFolderName))
205-
}
206174

207175
// Backup the kotlin source files location
208176
val kotlinMainSources: FileCollection = kotlin.sourceSets.main.get().kotlin.sourceDirectories
@@ -223,10 +191,6 @@ val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) {
223191
}
224192
task {
225193
group = "KDocs"
226-
doLast {
227-
// ensure generated sources are added to git
228-
addGeneratedSourcesToGit.executeCommand()
229-
}
230194
}
231195
}
232196

gradle/scripts/pre-commit

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)