You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/03/23 12:51:00 UTC
[pulsar] 10/16: Allow DockerImage to be built from source tarball
(#9846)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 39ce0fa0c09939f8b889ad2c8c5c3a51066a30f3
Author: Enrico Olivelli <eo...@gmail.com>
AuthorDate: Wed Mar 10 02:51:28 2021 +0100
Allow DockerImage to be built from source tarball (#9846)
Fixes #9845
### Modifications
Do not use the git command in order to get the ROOT directory of the project.
### Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
I also tested it locally, it applies also to 2.7.1rc1 source tarball
(cherry picked from commit 8e1759b8ee0d2ffe75d742c1d297c9cc6d2d2ba3)
---
pulsar-client-cpp/docker/build-wheels.sh | 2 +-
pulsar-client-cpp/pkg/deb/build-deb.sh | 2 +-
pulsar-client-cpp/pkg/deb/docker-build-deb.sh | 2 +-
pulsar-client-cpp/pkg/rpm/build-rpm.sh | 2 +-
pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pulsar-client-cpp/docker/build-wheels.sh b/pulsar-client-cpp/docker/build-wheels.sh
index 84e550f..cfed1df 100755
--- a/pulsar-client-cpp/docker/build-wheels.sh
+++ b/pulsar-client-cpp/docker/build-wheels.sh
@@ -23,7 +23,7 @@ set -e
BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build}"
-ROOT_DIR=$(git rev-parse --show-toplevel)
+ROOT_DIR=$(dirname $0)/../..
cd $ROOT_DIR
PYTHON_VERSIONS=(
diff --git a/pulsar-client-cpp/pkg/deb/build-deb.sh b/pulsar-client-cpp/pkg/deb/build-deb.sh
index ce42107..ac3bb5d 100755
--- a/pulsar-client-cpp/pkg/deb/build-deb.sh
+++ b/pulsar-client-cpp/pkg/deb/build-deb.sh
@@ -21,7 +21,7 @@
set -e -x
cd /pulsar
-SRC_ROOT_DIR=$(git rev-parse --show-toplevel)
+SRC_ROOT_DIR=$(pwd)
cd $SRC_ROOT_DIR/pulsar-client-cpp/pkg/deb
POM_VERSION=`$SRC_ROOT_DIR/src/get-project-version.py`
diff --git a/pulsar-client-cpp/pkg/deb/docker-build-deb.sh b/pulsar-client-cpp/pkg/deb/docker-build-deb.sh
index 5f0212e..4fa4433 100755
--- a/pulsar-client-cpp/pkg/deb/docker-build-deb.sh
+++ b/pulsar-client-cpp/pkg/deb/docker-build-deb.sh
@@ -20,7 +20,7 @@
set -e
-ROOT_DIR=$(git rev-parse --show-toplevel)
+ROOT_DIR=$(dirname $0)/../../..
docker pull apachepulsar/pulsar-build:debian-9
diff --git a/pulsar-client-cpp/pkg/rpm/build-rpm.sh b/pulsar-client-cpp/pkg/rpm/build-rpm.sh
index d1857c2..af9bc33 100755
--- a/pulsar-client-cpp/pkg/rpm/build-rpm.sh
+++ b/pulsar-client-cpp/pkg/rpm/build-rpm.sh
@@ -21,7 +21,7 @@
set -e
cd /pulsar
-ROOT_DIR=$(git rev-parse --show-toplevel)
+ROOT_DIR=$(dirname $0)/../..
cd $ROOT_DIR/pulsar-client-cpp/pkg/rpm
POM_VERSION=`$ROOT_DIR/src/get-project-version.py`
diff --git a/pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh b/pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
index 58260b1..7082bbe 100755
--- a/pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
+++ b/pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
@@ -20,7 +20,7 @@
set -e
-ROOT_DIR=$(git rev-parse --show-toplevel)
+ROOT_DIR=$(dirname $0)/../../../..
docker pull apachepulsar/pulsar-build:centos-7