Skip to content

Commit

Permalink
IGNTIE-20629 Exclude ODBC build from assemble pipeline by default (#2706
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Pochatkin committed Oct 20, 2023
1 parent 35d03f0 commit 4c79c5d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8

#staging_user=*INSERT STAGING USERNAME HERE*
#staging_password=*INSERT STAGING PASSWORD HERE*

##Use in case when need to build odbc driver.
#odbc.enable=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 7 additions & 5 deletions modules/platforms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ if (project.hasProperty('prepareRelease')) {
}

artifacts {
odbc(file("$buildDir/cpp/lib/libignite3-odbc.so")) {
builtBy cmakeBuildOdbc
}
odbc(file("$buildDir/cpp/lib/libignite3-odbc.so.3")) {
builtBy cmakeBuildOdbc
if (project.hasProperty('odbc.enable')) {
odbc(file("$buildDir/cpp/lib/libignite3-odbc.so")) {
builtBy cmakeBuildOdbc
}
odbc(file("$buildDir/cpp/lib/libignite3-odbc.so.3")) {
builtBy cmakeBuildOdbc
}
}
}
27 changes: 25 additions & 2 deletions packaging/odbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def tokens = [
]

task replacePackageScriptVars(type: Copy) {
onlyIf {
project.hasProperty('odbc.enable')
}

from "$rootDir/packaging/odbc/ignite3-odbc.ini"

from "$rootDir/packaging/odbc/scripts"
Expand All @@ -68,10 +72,26 @@ distributions {
}
}

distZip.dependsOn replacePackageScriptVars
distTar.dependsOn replacePackageScriptVars
distZip {
onlyIf {
project.hasProperty('odbc.enable')
}

dependsOn replacePackageScriptVars
}

distTar {
onlyIf {
project.hasProperty('odbc.enable')
}

dependsOn replacePackageScriptVars
}

buildRpm {
onlyIf {
project.hasProperty('odbc.enable')
}
dependsOn replacePackageScriptVars
requires("unixODBC")

Expand All @@ -82,6 +102,9 @@ buildRpm {
}

buildDeb {
onlyIf {
project.hasProperty('odbc.enable')
}
dependsOn replacePackageScriptVars
requires("unixodbc")
requires("odbcinst")
Expand Down

0 comments on commit 4c79c5d

Please sign in to comment.