Skip to content

Commit

Permalink
Merge pull request #132 from Nuvindu/gradle-clean
Browse files Browse the repository at this point in the history
Fix docker command for clean task
  • Loading branch information
Nuvindu authored Feb 16, 2024
2 parents aa3df86 + 35a758c commit dd16a31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,9 @@ class BallerinaPlugin implements Plugin<Project> {
project.exec {
def deleteUsingDocker = """
docker run -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
/bin/sh -c "cd $parentDirectory.name/$projectDirectory.name && rm -rf build target"
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
/bin/sh -c "find /home/ballerina/$parentDirectory.name -type d -name 'build' -exec rm -rf {} + && find /home/ballerina/$parentDirectory.name -type d -name 'target' -exec rm -rf {} +"
"""
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "$deleteUsingDocker"
Expand Down

0 comments on commit dd16a31

Please sign in to comment.