Skip to content

Commit 9655da9

Browse files
committed
Download source tarball from release candidate instead in 02-source.sh
1 parent 8bf5c23 commit 9655da9

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

dev/release/02-source.sh

+7-27
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,13 @@ echo "Using commit $release_hash"
5757

5858
tarball=apache-arrow-${version}.tar.gz
5959

60-
rm -rf ${tag}
61-
# be conservative and use the release hash, even though git produces the same
62-
# archive (identical hashes) using the scm tag
63-
(cd "${SOURCE_TOP_DIR}" && \
64-
git archive ${release_hash} --prefix ${tag}/) | \
65-
tar xf -
66-
67-
# Resolve all hard and symbolic links.
68-
# If we change this, we must change ArrowSources.archive in
69-
# dev/archery/archery/utils/source.py too.
70-
rm -rf ${tag}.tmp
71-
mv ${tag} ${tag}.tmp
72-
cp -R -L ${tag}.tmp ${tag}
73-
rm -rf ${tag}.tmp
74-
75-
# Create a dummy .git/ directory to download the source files from GitHub with Source Link in C#.
76-
dummy_git=${tag}/csharp/dummy.git
77-
mkdir ${dummy_git}
78-
pushd ${dummy_git}
79-
echo ${release_hash} > HEAD
80-
echo '[remote "origin"] url = https://github.com/apache/arrow.git' >> config
81-
mkdir objects refs
82-
popd
83-
84-
# Create new tarball from modified source directory
85-
tar czf ${tarball} ${tag}
86-
rm -rf ${tag}
60+
rm -f ${tarball}
61+
62+
gh release download \
63+
${tag} \
64+
--repo apache/arrow \
65+
--dir . \
66+
--pattern "${tarball}"
8767

8868
if [ ${SOURCE_RAT} -gt 0 ]; then
8969
"${SOURCE_DIR}/run-rat.sh" ${tarball}

0 commit comments

Comments
 (0)