diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-04-12 14:26:02 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-04-12 14:26:02 +0300 |
commit | 0a4d11e9ffc6249cd3dec77106b6543b0e809fce (patch) | |
tree | 4beeb39ec635db15c02f83ee68555cbf5a185062 | |
parent | 73b78bab1037a53feaf0bd873ca0d0bbd0b1df82 (diff) |
do not require MSGH blob, clone in temp dir and cleanup thereof
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r-- | setup-releases-repository/init-github-actions.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/setup-releases-repository/init-github-actions.sh b/setup-releases-repository/init-github-actions.sh index 4167f20..ffd1933 100644 --- a/setup-releases-repository/init-github-actions.sh +++ b/setup-releases-repository/init-github-actions.sh @@ -13,10 +13,7 @@ fi GITHUB_CLI=$(which "gh") if [ -x "$GITHUB_CLI" ]; then - echo "Using GitHub CLI executable $GITHUB_CLI" -else - echo "Could not find GitHub CLI executable $GITHUB_CLI" >&2 - exit 1 + echo "Using Microsoft GitHub CLI executable $GITHUB_CLI" fi APP_ID=$1 @@ -27,6 +24,10 @@ else exit 1 fi +ORIGINAL_DIR=$(pwd) +WORK_DIR=$(mktemp -d) +cd "${WORK_DIR}" + $GIT clone https://github.com/nextcloud-releases/$APP_ID.git cd $APP_ID @@ -98,6 +99,12 @@ $GIT add .github/workflows/blank.yml $GIT commit -m "Activate github actions with a trick" $GIT push --set-upstream origin $($GIT symbolic-ref --short HEAD) -$GITHUB_CLI pr create --base main --fill -$GIT push --delete origin activate-actions +if [ -x "$GITHUB_CLI" ]; then + $GITHUB_CLI pr create --base main --fill + $GIT push --delete origin activate-actions +else + xdg-open "https://github.com/nextcloud-releases/${APP_ID}/pull/new/activate-actions" 2>/dev/null +fi +cd "${ORIGINAL_DIR}" +rm -Rf "${WORK_DIR}" |