Skip to content

Commit

Permalink
Merge pull request #796 from gabilang/fix-build-issues
Browse files Browse the repository at this point in the history
Fix build issues
  • Loading branch information
gabilang authored Aug 2, 2023
2 parents 7a012b8 + 3d4384c commit 4323f28
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure all Java files use LF.
*.java eol=lf
7 changes: 4 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerinax"
name = "postgresql"
version = "1.10.0"
version = "1.10.1"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS", "PostgreSQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-postgresql"
Expand All @@ -15,11 +15,12 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "postgresql-native"
version = "1.10.0"
path = "../native/build/libs/postgresql-native-1.10.0.jar"
version = "1.10.1"
path = "../native/build/libs/postgresql-native-1.10.1-SNAPSHOT.jar"

[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.10.0"
path = "./lib/sql-native-1.10.0.jar"

2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "postgresql-compiler-plugin"
class = "io.ballerina.stdlib.postgresql.compiler.PostgreSQLCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/postgresql-compiler-plugin-1.10.0.jar"
path = "../compiler-plugin/build/libs/postgresql-compiler-plugin-1.10.1-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.7.0"
distribution-version = "2201.8.0-20230726-145300-b2bdf796"

[[package]]
org = "ballerina"
Expand All @@ -22,7 +22,7 @@ modules = [
[[package]]
org = "ballerina"
name = "file"
version = "1.8.0"
version = "1.8.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand Down Expand Up @@ -161,7 +161,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "postgresql"
version = "1.10.0"
version = "1.10.1"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand Down
18 changes: 9 additions & 9 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ task createTestDockerImage(type: Exec) {
commandLine 'sh', '-c', "docker build -f ${project.projectDir}/tests/resources/Dockerfile -t ballerinax-postgresql" +
" -q ${project.projectDir}/tests/resources/"
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
sleep(10 * 1000)
}
}
}

def checkExecResult(execResult, failText, standardOutput){
if (execResult) {
if (execResult.getExitValue() != 0) {
throw new GradleException('Non-zero exit value: ' + execResult.getExitValue())
def checkExecResult(executionResult, failText, standardOutput){
if (executionResult) {
if (executionResult.get().getExitValue() != 0) {
throw new GradleException('Non-zero exit value: ' + executionResult.get().getExitValue())
}
if (standardOutput.toString().contains(failText)){
throw new GradleException('"' + failText + '" string in output: ' + standardOutput.toString())
Expand Down Expand Up @@ -168,7 +168,7 @@ task startTestDockerContainer(type: Exec) {
def healthCheck = 1;
def counter = 0;
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
while (healthCheck != 0 && counter < 12) {
sleep(5 * 1000)
healthCheck = checkTestDockerContainerStatus(testContainerName)
Expand All @@ -189,7 +189,7 @@ task startTestLimitedDockerContainer(type: Exec) {
def healthCheck = 1;
def counter = 0;
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
while (healthCheck != 0 && counter < 12) {
sleep(5 * 1000)
healthCheck = checkTestDockerContainerStatus(testContainerName)
Expand All @@ -210,7 +210,7 @@ task startTestPoolDockerContainer(type: Exec) {
def healthCheck = 1;
def counter = 0;
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
while (healthCheck != 0 && counter < 12) {
sleep(5 * 1000)
healthCheck = checkTestDockerContainerStatus(poolContainerName)
Expand All @@ -231,7 +231,7 @@ task startSslDockerContainer(type: Exec) {
def healthCheck = 1;
def counter = 0;
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
while (healthCheck != 0 && counter < 12) {
sleep(5 * 1000)
healthCheck = checkTestDockerContainerStatus(sslContainerName)
Expand Down

0 comments on commit 4323f28

Please sign in to comment.