Skip to content

Commit

Permalink
fix missing env
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiangC committed Jul 5, 2024
1 parent 08ed7a4 commit ef970c4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ def genTasks = { target ->
def final BASE_VERSION = config.bigtop.components[target].version.base
def final SRCDEB = "${PKG_NAME}_$PKG_VERSION-${BIGTOP_BUILD_STAMP}.dsc"
def final HADOOP_VERSION = config.bigtop.components["hadoop"].version.pkg
def final FULL_PARENT_DIR = getParentDir(config.bigtop.base_version, "deb")
def final DEB_PKG_NAME_SUFFIX = getPkgNameSuffix(config.bigtop.components[target], "deb").pkgNameSuffix
def final BIGTOP_BASE_VERSION = "${config.bigtop.base_version}"

exec {
workingDir PKG_OUTPUT_DIR
Expand All @@ -399,6 +402,9 @@ def genTasks = { target ->
--set-envvar=${toOldStyleName(target)}_BASE_VERSION=$BASE_VERSION \
--set-envvar=${toOldStyleName(target)}_VERSION=$PKG_VERSION \
--set-envvar=${toOldStyleName(target)}_RELEASE=$BIGTOP_BUILD_STAMP \
--set-envvar=PARENT_DIR=$FULL_PARENT_DIR \
--set-envvar=PKG_NAME_SUFFIX=$DEB_PKG_NAME_SUFFIX \
--set-envvar=bigtop_base_version=${BIGTOP_BASE_VERSION} \
-uc -us -b
"""
exec {
Expand Down Expand Up @@ -428,7 +434,8 @@ def genTasks = { target ->
println "\tNothing to do. Exiting..."
return
}
def final BIGTOP_BUILD_STAMP = System.getenv('BIGTOP_BUILD_STAMP') ?:
def final BIGTOP_BASE_VERSION = "${config.bigtop.base_version}"
def final BIGTOP_BUILD_STAMP = System.getenv('BIGTOP_BUILD_STAMP') ?:
config.bigtop.components[target].version.release
def final TARBALL_SRC = config.bigtop.components[target].tarball.source
def final TARBALL_DST = config.bigtop.components[target].tarball.destination ?: TARBALL_SRC
Expand All @@ -443,6 +450,8 @@ def genTasks = { target ->
def final DEB_PKG_DIR = "$PKG_BUILD_DIR/deb/$PKG_NAME-${PKG_VERSION}-${BIGTOP_BUILD_STAMP}"
def final ENABLE_MAVEN_PARALLEL_BUILD = config.bigtop.components[target].maven_parallel_build
def final MAVEN_BUILD_THREADS = project.hasProperty('buildThreads') ? project.property('buildThreads') : null
def final FULL_PARENT_DIR = getParentDir(config.bigtop.base_version, "deb")
def final DEB_PKG_NAME_SUFFIX = getPkgNameSuffix(config.bigtop.components[target], "deb").pkgNameSuffix

mkdir (DEB_BLD_DIR)
copy {
Expand Down Expand Up @@ -511,6 +520,9 @@ def genTasks = { target ->
// Creating source package
exec {
workingDir DEB_BLD_DIR
environment 'PARENT_DIR', FULL_PARENT_DIR
environment 'PKG_NAME_SUFFIX', DEB_PKG_NAME_SUFFIX
environment 'bigtop_base_version', BIGTOP_BASE_VERSION
commandLine "dpkg-buildpackage -uc -us -sa -S".split(' ')
}
mkdir(PKG_OUTPUT_DIR)
Expand Down

0 comments on commit ef970c4

Please sign in to comment.