Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864776
D8674.id26376.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D8674.id26376.diff
View Options
diff --git a/contrib/release/github-release.sh b/contrib/release/github-release.sh
--- a/contrib/release/github-release.sh
+++ b/contrib/release/github-release.sh
@@ -13,8 +13,8 @@
help_message() {
echo "Create a draft Github release and upload binaries."
echo "Usage: $0 <options>"
- echo "-a, --asset-dir (required) Path to the top-level directory outputted by a Gitian build."
- echo " This directory must contain linux, osx, and win binaries in those respective sub-directories."
+ echo "-a, --asset-dir Path to the top-level directory outputted by a Gitian build."
+ echo " This directory must contain linux, osx, and win binaries in those respective sub-directories."
echo "-d, --dry-run Run through the script, but do not touch existing tags, push to Github, or upload release files."
echo "-h, --help Display this help message."
echo "-o, --oauth-token Path to a file containing your OAuth token (defaults to: '${OAUTH_TOKEN_PATH}')."
@@ -103,37 +103,35 @@
VERSION=$(echo "${TAG}" | cut -c 2-)
# Collect list of assets (binaries) to upload
-if [ -z "${ASSET_DIR}" ]; then
- echo "Error: Asset directory was not set. Try setting it with [ -a | --asset-dir ]"
- exit 30
-fi
ASSET_LIST=()
-if [ -d "${ASSET_DIR}" ]; then
- # Linux binaries
- ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-aarch64-linux-gnu.tar.gz")
- ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-arm-linux-gnueabihf.tar.gz")
- ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-x86_64-linux-gnu.tar.gz")
-
- # OSX binaries
- ASSET_LIST+=("${ASSET_DIR}/osx/bitcoin-abc-${VERSION}-osx-unsigned.dmg")
-
- # Windows binaries
- ASSET_LIST+=("${ASSET_DIR}/win/bitcoin-abc-${VERSION}-win64-setup-unsigned.exe")
-
- for FILENAME in "${ASSET_LIST[@]}"; do
- if [ ! -f "${FILENAME}" ]; then
- echo "Error: Expected binary '${FILENAME}' does not exist"
- exit 31
- fi
- done
+if [ -n "${ASSET_DIR}" ]; then
+ if [ -d "${ASSET_DIR}" ]; then
+ # Linux binaries
+ ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-aarch64-linux-gnu.tar.gz")
+ ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-arm-linux-gnueabihf.tar.gz")
+ ASSET_LIST+=("${ASSET_DIR}/linux/bitcoin-abc-${VERSION}-x86_64-linux-gnu.tar.gz")
+
+ # OSX binaries
+ ASSET_LIST+=("${ASSET_DIR}/osx/bitcoin-abc-${VERSION}-osx-unsigned.dmg")
+
+ # Windows binaries
+ ASSET_LIST+=("${ASSET_DIR}/win/bitcoin-abc-${VERSION}-win64-setup-unsigned.exe")
+
+ for FILENAME in "${ASSET_LIST[@]}"; do
+ if [ ! -f "${FILENAME}" ]; then
+ echo "Error: Expected binary '${FILENAME}' does not exist"
+ exit 31
+ fi
+ done
- # Add any signature files
- for FILENAME in "${ASSET_DIR}"/*"-sha256sums.${VERSION}.asc"; do
- ASSET_LIST+=("${FILENAME}")
- done
-else
- echo "Error: Asset directory '${ASSET_DIR}' does not exist"
- exit 32
+ # Add any signature files
+ for FILENAME in "${ASSET_DIR}"/*"-sha256sums.${VERSION}.asc"; do
+ ASSET_LIST+=("${FILENAME}")
+ done
+ else
+ echo "Error: Asset directory '${ASSET_DIR}' does not exist"
+ exit 32
+ fi
fi
# Fetch release notes
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 22:15 (20 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5864554
Default Alt Text
D8674.id26376.diff (3 KB)
Attached To
D8674: Make uploading the assets optional when creating a release draft
Event Timeline
Log In to Comment