Skip to content

Commit ae17dd5

Browse files
committed
Add SOURCE_TOP_DIR and SOURCE_DIR variables
1 parent 9d55f9a commit ae17dd5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dev/release/utils-create-release-tarball.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
# under the License.
1919
#
2020

21+
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
22+
SOURCE_TOP_DIR="$(cd "${SOURCE_DIR}/../../" && pwd)"
23+
2124
if [ "$#" -ne 2 ]; then
2225
echo "Usage: $0 <version> <rc-num>"
2326
exit
2427
fi
2528

29+
version=$1
30+
rc=$2
31+
2632
tag=apache-arrow-${version}-rc${rc}
2733
tarball=apache-arrow-${version}.tar.gz
2834

@@ -32,7 +38,9 @@ rm -rf ${tag}
3238

3339
# be conservative and use the release hash, even though git produces the same
3440
# archive (identical hashes) using the scm tag
35-
git archive ${release_hash} --prefix ${tag}/ | tar xf -
41+
(cd "${SOURCE_TOP_DIR}" && \
42+
git archive ${release_hash} --prefix ${tag}/) | \
43+
tar xf -
3644

3745
# Resolve symbolic and hard links
3846
rm -rf ${tag}.tmp

0 commit comments

Comments
 (0)