@@ -46,6 +46,7 @@ rc_url="https://dist.apache.org/repos/dist/dev/arrow/${tag}"
4646echo " Preparing source for tag ${tag} "
4747
4848: ${release_hash:= $(cd " ${SOURCE_TOP_DIR} " && git rev-list --max-count=1 ${tag} )}
49+ : ${GITHUB_REPOSITORY:= apache/ arrow}
4950
5051if [ ${SOURCE_UPLOAD} -gt 0 ]; then
5152 if [ -z " $release_hash " ]; then
@@ -62,35 +63,40 @@ if [ ${SOURCE_DOWNLOAD} -gt 0 ]; then
6263 # Wait for the release candidate workflow to finish before attempting
6364 # to download the tarball from the GitHub Release.
6465 . $SOURCE_DIR /utils-watch-gh-workflow.sh ${tag} " release_candidate.yml"
65- rm -f ${tarball}
66- gh release download \
67- ${tag} \
68- --repo apache/arrow \
69- --dir . \
70- --pattern " ${tarball} "
66+ . $SOURCE_DIR /utils-watch-gh-workflow.sh ${tag} " csharp.yml"
67+ rm -rf artifacts
68+ gh release download ${tag} \
69+ --dir artifacts \
70+ --repo " ${GITHUB_REPOSITORY} "
7171fi
7272
7373if [ ${SOURCE_RAT} -gt 0 ]; then
74- " ${SOURCE_DIR} /run-rat.sh" ${tarball}
74+ " ${SOURCE_DIR} /run-rat.sh" artifacts/ ${tarball}
7575fi
7676
77- if type shasum > /dev/null 2>&1 ; then
78- sha256_generate=" shasum -a 256"
79- sha512_generate=" shasum -a 512"
80- else
81- sha256_generate=" sha256sum"
82- sha512_generate=" sha512sum"
83- fi
84-
85-
8677if [ ${SOURCE_UPLOAD} -gt 0 ]; then
87- # sign the archive
88- gpg --armor --output ${tarball} .asc --detach-sig ${tarball}
89- ${sha256_generate} $tarball > ${tarball} .sha256
90- ${sha512_generate} $tarball > ${tarball} .sha512
78+ rm -rf signed-artifacts
79+ mkdir -p signed-artifacts
80+
81+ # sign the artifacts
82+ for artifact in artifacts/* ; do
83+ case " ${artifact} " in
84+ * .sha256|* .sha512)
85+ continue
86+ ;;
87+ esac
88+ gpg \
89+ --armor \
90+ --detach-sig \
91+ --output signed-artifacts/$( basename ${artifact} ) .asc \
92+ ${artifact}
93+ done
9194
9295 # Upload signed tarballs to GitHub Release
93- gh release upload --repo apache/arrow ${tag} ${tarball} .sha256 ${tarball} .sha512
96+ gh release upload ${tag} \
97+ --repo " ${GITHUB_REPOSITORY} " \
98+ --verify-tag \
99+ signed-artifacts/*
94100
95101 # check out the arrow RC folder
96102 svn co --depth=empty https://dist.apache.org/repos/dist/dev/arrow tmp
@@ -99,13 +105,16 @@ if [ ${SOURCE_UPLOAD} -gt 0 ]; then
99105 mkdir -p tmp/${tag}
100106
101107 # copy the rc tarball into the tmp dir
102- cp ${tarball} * tmp/${tag}
108+ cp artifacts/${tarball} * tmp/${tag}
109+ cp signed-artifacts/${tarball} .asc tmp/${tag}
103110
104111 # commit to svn
105112 svn add tmp/${tag}
106113 svn ci -m " Apache Arrow ${version} RC${rc} " tmp/${tag}
107114
108115 # clean up
116+ rm -rf artifacts
117+ rm -rf signed-artifacts
109118 rm -rf tmp
110119
111120 echo " Success! The release candidate is available here:"
@@ -124,7 +133,7 @@ if [ ${SOURCE_PR} -gt 0 ]; then
124133 --head-branch=${rc_branch} \
125134 --pr-body=" PR to verify Release Candidate" \
126135 --pr-title=" WIP: [Release] Verify ${rc_branch} " \
127- --remote=https://github.com/apache/arrow \
136+ --remote=https://github.com/${GITHUB_REPOSITORY} \
128137 --rc=${rc} \
129138 --verify-source \
130139 --version=${version}
@@ -143,7 +152,7 @@ if [ ${SOURCE_VOTE} -gt 0 ]; then
143152 curl_options+=(--get)
144153 curl_options+=(--data " state=open" )
145154 curl_options+=(--data " head=apache:${rc_branch} " )
146- curl_options+=(https://api.github.com/repos/apache/arrow /pulls)
155+ curl_options+=(https://api.github.com/repos/${GITHUB_REPOSITORY} /pulls)
147156 verify_pr_url=$( curl " ${curl_options[@]} " | jq -r " .[0].html_url" )
148157 echo " The following draft email has been created to send to the"
149158 echo " [email protected] mailing list" @@ -163,13 +172,13 @@ This release candidate is based on commit:
163172${release_hash} [2]
164173
165174The source release rc${rc} is hosted at [3].
166- The binary artifacts are hosted at [4][5][6][7][8][9][10] .
167- The changelog is located at [11 ].
175+ The binary artifacts are hosted at [4][5][6][7][8][9].
176+ The changelog is located at [10 ].
168177
169178Please download, verify checksums and signatures, run the unit tests,
170- and vote on the release. See [12 ] for how to validate a release candidate.
179+ and vote on the release. See [11 ] for how to validate a release candidate.
171180
172- See also a verification result on GitHub pull request [13 ].
181+ See also a verification result on GitHub pull request [12 ].
173182
174183The vote will be open for at least 72 hours.
175184
@@ -184,12 +193,11 @@ The vote will be open for at least 72 hours.
184193[5]: https://apache.jfrog.io/artifactory/arrow/amazon-linux-rc/
185194[6]: https://apache.jfrog.io/artifactory/arrow/centos-rc/
186195[7]: https://apache.jfrog.io/artifactory/arrow/debian-rc/
187- [8]: https://apache.jfrog.io/artifactory/arrow/nuget-rc/${version} -rc${rc}
188- [9]: https://apache.jfrog.io/artifactory/arrow/python-rc/${version} -rc${rc}
189- [10]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
190- [11]: https://github.com/apache/arrow/blob/${release_hash} /CHANGELOG.md
191- [12]: https://arrow.apache.org/docs/developers/release_verification.html
192- [13]: ${verify_pr_url}
196+ [8]: https://apache.jfrog.io/artifactory/arrow/python-rc/${version} -rc${rc}
197+ [9]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
198+ [10]: https://github.com/apache/arrow/blob/${release_hash} /CHANGELOG.md
199+ [11]: https://arrow.apache.org/docs/developers/release_verification.html
200+ [12]: ${verify_pr_url}
193201MAIL
194202 echo " ---------------------------------------------------------"
195203fi
0 commit comments