Skip to content

Commit

Permalink
Improve local clean to make re-runs more reliable
Browse files Browse the repository at this point in the history
Signed-off-by: Chad Wilson <chadw@thoughtworks.com>
  • Loading branch information
chadlwilson committed Feb 3, 2025
1 parent 92cb13f commit bf35d2e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ build/
.idea/workspace.xml
.idea/uiDesigner.xml
gauge_bin/
logs
logs/
testLogs/
reports*/
target
gauge-tests.iml
.vagrant
.gauge/
docs/
.DS_Store
.classpath
.project
.settings
resources/LocalTemplates/**/.bundle
resources/LocalTemplates/**/logs
resources/LocalTemplates/**/vendor
resources/LocalTemplates/**/Gemfile.lock
.buildlock
testLogs
resources/LocalTemplates/ruby/vendor
resources/LocalTemplates/ruby/Gemfile.lock
resources/LocalTemplates/ruby/.buildlock
resources/LocalTemplates/java
resources/LocalTemplates/python
resources/LocalTemplates/js
Expand Down
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ languages.each {lang ->
}
}
}

tasks.register("clean${lang}FT") {
doFirst {
delete "reports-${lang}"
if (lang == 'ruby') {
delete 'resources/LocalTemplates/ruby/vendor'
delete 'resources/LocalTemplates/ruby/.buildlock'
delete 'resources/LocalTemplates/ruby/Gemfile.lock'
} else {
delete "resources/LocalTemplates/${lang}"
}
}
}
clean.dependsOn "clean${lang}FT"
}

tasks.withType(Test).configureEach {
Expand All @@ -57,3 +71,12 @@ tasks.withType(GaugeTask).configureEach {
testClassesDirs = sourceSets.test.output
classpath = sourceSets.test.runtimeClasspath
}

tasks.register('cleanGauge') {
doFirst {
delete '.gauge'
delete 'logs'
delete 'testLogs'
}
}
clean.dependsOn cleanGauge

0 comments on commit bf35d2e

Please sign in to comment.