From 9e1d543641b464c86465506f1bbb6ddb5fe24d9c Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Fri, 31 Jul 2020 16:55:35 -0700 Subject: [PATCH] Hopefully fix throwing files in the tip. Hook up more with env vars rather than hard-coded bintray. --- .github/workflows/build32.yml | 4 ++-- build32.sh | 2 +- ci-library.sh | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build32.yml b/.github/workflows/build32.yml index db1301a..2085d1e 100644 --- a/.github/workflows/build32.yml +++ b/.github/workflows/build32.yml @@ -18,7 +18,7 @@ on: env: PACMAN_REPOSITORY_NAME: build32 DEPLOY_PROVIDER: tip - #PACMAN_REPOSITORY_URL: blah + PACMAN_REPOSITORY_URL: https://github.com/${{ github.repository }}/releases/download/repo jobs: build32: @@ -64,4 +64,4 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} tag: 'repo' - files: artifact/* + files: packages/* diff --git a/build32.sh b/build32.sh index e480cee..623d603 100755 --- a/build32.sh +++ b/build32.sh @@ -27,6 +27,6 @@ done # Deploy cd ../artifacts -false && execute 'Generating pacman repository' create_pacman_repository "${PACMAN_REPOSITORY_NAME:-ci-build}" || execute 'Generating pacman repository' repo-add "${PACMAN_REPOSITORY_NAME:-ci-build}.db.tar.xz" *.pkg.tar.* +execute 'Generating pacman repository' create_pacman_repository "${PACMAN_REPOSITORY_NAME:-ci-build}" execute 'SHA-256 checksums' sha256sum * success 'All artifacts built successfully' diff --git a/ci-library.sh b/ci-library.sh index a7b7c2d..b3a500d 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -96,9 +96,8 @@ _build_add() { # Download previous artifact _download_previous() { local filenames=("${@}") - [[ "${DEPLOY_PROVIDER}" = bintray ]] || return 1 for filename in "${filenames[@]}"; do - if ! wget --no-verbose "https://dl.bintray.com/${BINTRAY_ACCOUNT}/${BINTRAY_REPOSITORY}/${filename}"; then + if ! wget --no-verbose "${PACMAN_REPOSITORY_URL}/${filename}"; then rm -f "${filenames[@]}" return 1 fi @@ -131,10 +130,8 @@ execute(){ # Update system update_system() { - repman add ci.msys 'https://dl.bintray.com/alexpux/msys2' || return 1 + repman add $PACMAN_REPOSITORY_NAME $PACMAN_REPOSITORY_URL || return 1 pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade || return 1 - test -n "${DISABLE_QUALITY_CHECK}" && return 0 # TODO: remove this option when not anymore needed - pacman --noconfirm --needed --noprogressbar --sync ci.msys/pactoys } # Sort packages by dependency