Skip to content

Commit

Permalink
build: improve comprehensiveness of gradle clean (#5003)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Jul 15, 2022
1 parent 369c655 commit fdea718
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ clean {
delete 'build'
delete 'just'
delete 'src/types.generated.ts'
delete 'src/graphql/*.generated.ts'
delete fileTree(dir: 'src/graphql', include: '*.generated.ts')
}

configurations {
Expand Down
3 changes: 3 additions & 0 deletions docs-website/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ clean {
delete 'tmp'
delete 'build'
delete 'just'
delete fileTree(dir: 'genDocs', exclude: '.gitignore')
delete fileTree(dir: 'docs', exclude: '.gitignore')
delete 'graphql/combined.graphql'
yarnClear
}

Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion-modules/airflow-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ task testFull(type: Exec, dependsOn: [testQuick, installDevTest]) {
}

task cleanPythonCache(type: Exec) {
commandLine 'bash', '-x', '-c',
commandLine 'bash', '-c',
"find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
}

Expand Down
7 changes: 5 additions & 2 deletions metadata-ingestion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ task docGen(type: Exec, dependsOn: [codegen, installDevTest]) {


task cleanPythonCache(type: Exec) {
commandLine 'bash', '-x', '-c',
"find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
commandLine 'bash', '-c',
"find src tests -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
}

build.dependsOn install
Expand All @@ -158,5 +158,8 @@ clean {
delete 'dist'
delete 'src/datahub/metadata'
delete '../docs/generated'
delete 'generated'
delete '.mypy_cache'
delete '.pytest_cache'
}
clean.dependsOn cleanPythonCache
1 change: 0 additions & 1 deletion metadata-integration/java/datahub-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ if (project.hasProperty("releaseVersion")) {
try {
// apply this plugin in a try-catch block so that we can handle cases without .git directory
apply plugin: "com.palantir.git-version"
println("In else section")
def details = versionDetails()
detailedVersionString = gitVersion()
version = details.lastTag
Expand Down
1 change: 0 additions & 1 deletion metadata-integration/java/spark-lineage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ if (project.hasProperty("releaseVersion")) {
try {
// apply this plugin in a try-catch block so that we can handle cases without .git directory
apply plugin: "com.palantir.git-version"
println("In else section")
def details = versionDetails()
detailedVersionString = gitVersion()
version = details.lastTag
Expand Down

0 comments on commit fdea718

Please sign in to comment.