From 644cc69108f71f418572287677136f4eaabf6084 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 3 Feb 2021 14:44:40 +0000 Subject: [PATCH] build: update GitHub release tool to use gh and put a link to changelog Fixes #4994 --- bin/upload-github | 54 ++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/bin/upload-github b/bin/upload-github index a78a60d31..f4fa1cdc7 100755 --- a/bin/upload-github +++ b/bin/upload-github @@ -2,49 +2,45 @@ # # Upload a release # -# Needs github-release from https://github.com/aktau/github-release +# Needs the gh tool from https://github.com/cli/cli set -e -REPO="rclone" +REPO="rclone/rclone" if [ "$1" == "" ]; then echo "Syntax: $0 Version" exit 1 fi VERSION="$1" -if [ "$GITHUB_USER" == "" ]; then - echo 1>&2 "Need GITHUB_USER environment variable" - exit 1 -fi -if [ "$GITHUB_TOKEN" == "" ]; then - echo 1>&2 "Need GITHUB_TOKEN environment variable" - exit 1 -fi +ANCHOR=$(grep '^## v' docs/content/changelog.md | head -1 | sed 's/^## //; s/[^A-Za-z0-9-]/-/g; s/--*/-/g') -echo "Making release ${VERSION}" -github-release release \ +cat > "/tmp/${VERSION}-release-notes" <