mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-29 01:42:08 +00:00
build: improve comprehensiveness of gradle clean (#5003)
This commit is contained in:
parent
369c65522c
commit
fdea718e38
@ -74,7 +74,7 @@ clean {
|
|||||||
delete 'build'
|
delete 'build'
|
||||||
delete 'just'
|
delete 'just'
|
||||||
delete 'src/types.generated.ts'
|
delete 'src/types.generated.ts'
|
||||||
delete 'src/graphql/*.generated.ts'
|
delete fileTree(dir: 'src/graphql', include: '*.generated.ts')
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
|
|||||||
@ -124,6 +124,9 @@ clean {
|
|||||||
delete 'tmp'
|
delete 'tmp'
|
||||||
delete 'build'
|
delete 'build'
|
||||||
delete 'just'
|
delete 'just'
|
||||||
|
delete fileTree(dir: 'genDocs', exclude: '.gitignore')
|
||||||
|
delete fileTree(dir: 'docs', exclude: '.gitignore')
|
||||||
|
delete 'graphql/combined.graphql'
|
||||||
yarnClear
|
yarnClear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ task testFull(type: Exec, dependsOn: [testQuick, installDevTest]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task cleanPythonCache(type: Exec) {
|
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"
|
"find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -144,8 +144,8 @@ task docGen(type: Exec, dependsOn: [codegen, installDevTest]) {
|
|||||||
|
|
||||||
|
|
||||||
task cleanPythonCache(type: Exec) {
|
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"
|
"find src tests -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
|
||||||
}
|
}
|
||||||
|
|
||||||
build.dependsOn install
|
build.dependsOn install
|
||||||
@ -158,5 +158,8 @@ clean {
|
|||||||
delete 'dist'
|
delete 'dist'
|
||||||
delete 'src/datahub/metadata'
|
delete 'src/datahub/metadata'
|
||||||
delete '../docs/generated'
|
delete '../docs/generated'
|
||||||
|
delete 'generated'
|
||||||
|
delete '.mypy_cache'
|
||||||
|
delete '.pytest_cache'
|
||||||
}
|
}
|
||||||
clean.dependsOn cleanPythonCache
|
clean.dependsOn cleanPythonCache
|
||||||
|
|||||||
@ -66,7 +66,6 @@ if (project.hasProperty("releaseVersion")) {
|
|||||||
try {
|
try {
|
||||||
// apply this plugin in a try-catch block so that we can handle cases without .git directory
|
// apply this plugin in a try-catch block so that we can handle cases without .git directory
|
||||||
apply plugin: "com.palantir.git-version"
|
apply plugin: "com.palantir.git-version"
|
||||||
println("In else section")
|
|
||||||
def details = versionDetails()
|
def details = versionDetails()
|
||||||
detailedVersionString = gitVersion()
|
detailedVersionString = gitVersion()
|
||||||
version = details.lastTag
|
version = details.lastTag
|
||||||
|
|||||||
@ -30,7 +30,6 @@ if (project.hasProperty("releaseVersion")) {
|
|||||||
try {
|
try {
|
||||||
// apply this plugin in a try-catch block so that we can handle cases without .git directory
|
// apply this plugin in a try-catch block so that we can handle cases without .git directory
|
||||||
apply plugin: "com.palantir.git-version"
|
apply plugin: "com.palantir.git-version"
|
||||||
println("In else section")
|
|
||||||
def details = versionDetails()
|
def details = versionDetails()
|
||||||
detailedVersionString = gitVersion()
|
detailedVersionString = gitVersion()
|
||||||
version = details.lastTag
|
version = details.lastTag
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user