build: improve comprehensiveness of gradle clean (#5003)

This commit is contained in:
Harshal Sheth 2022-07-15 06:08:32 -04:00 committed by GitHub
parent 369c65522c
commit fdea718e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 6 deletions

View File

@ -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 {

View File

@ -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
}

View File

@ -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"
}

View File

@ -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
@ -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

View File

@ -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

View File

@ -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