Skip to content

Commit

Permalink
Merge pull request #82 from niveathika/main
Browse files Browse the repository at this point in the history
Remove offline mode for breaking change build
  • Loading branch information
niveathika authored Dec 2, 2022
2 parents 3b9cb2c + 9b4edf2 commit 0ee5952
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ class BallerinaPlugin implements Plugin<Project> {
environment 'JAVA_OPTS', '-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true'
if (checkForBreakingChanges) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal pack --target-dir ${balBuildTarget} --offline ${debugParams}"
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal pack --target-dir ${balBuildTarget} ${debugParams}"
} else {
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal pack --target-dir ${balBuildTarget} --offline ${debugParams}"
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal pack --target-dir ${balBuildTarget} ${debugParams}"
}
} else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "$balJavaDebugParam $distributionBinPath/bal.bat pack --target-dir ${balBuildTarget} --offline ${debugParams} && exit %%ERRORLEVEL%%"
Expand All @@ -289,9 +289,9 @@ class BallerinaPlugin implements Plugin<Project> {
environment 'JAVA_OPTS', '-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true'
if (checkForBreakingChanges) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal test ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
} else {
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v $project.projectDir/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag $balJavaDebugParam bal test ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
}
} else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "$balJavaDebugParam $distributionBinPath/bal.bat test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams} && exit %%ERRORLEVEL%%"
Expand Down Expand Up @@ -366,9 +366,9 @@ class BallerinaPlugin implements Plugin<Project> {
environment 'JAVA_OPTS', '-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true'
if (checkForBreakingChanges) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v ${project.projectDir}/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag bal test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
commandLine 'cmd', '/c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v ${project.projectDir}/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag bal test ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
} else {
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v ${project.projectDir}/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag bal test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
commandLine 'sh', '-c', "docker run --rm --net=host --user \$(id -u):\$(id -g) -v ${project.projectDir}/..:/home -v $project.projectDir:/home/ballerina ballerina/ballerina:$ballerinaDockerTag bal test ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams}"
}
} else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "${balJavaDebugParam} ${distributionBinPath}/bal.bat test --offline ${nativeFlag} ${testCoverageParams} ${groupParams} ${disableGroups} ${debugParams} && exit %%ERRORLEVEL%%"
Expand Down

0 comments on commit 0ee5952

Please sign in to comment.