From a14051a88c4dac55c2c7d3a1301dd030896202eb Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 4 Mar 2021 22:24:53 +0100 Subject: [PATCH] ci: flatpak: Use appropriate branch and runtime version. Use githib to build beta plugins for now, leaving the existing 18.08 x86_64 circleci builder as-is. --- .github/workflows/shipdriver.yml | 1 + ci/github-build-flatpak.sh | 15 +++++++-------- .../org.opencpn.OpenCPN.Plugin.shipdriver.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/shipdriver.yml b/.github/workflows/shipdriver.yml index 51fe1486..362708c8 100644 --- a/.github/workflows/shipdriver.yml +++ b/.github/workflows/shipdriver.yml @@ -17,6 +17,7 @@ jobs: CLOUDSMITH_STABLE_REPO: ${{ secrets.CLOUDSMITH_STABLE_REPO}} CLOUDSMITH_UNSTABLE_REPO: ${{ secrets.CLOUDSMITH_UNSTABLE_REPO}} CLOUDSMITH_BETA_REPO: ${{ secrets.CLOUDSMITH_BETA_REPO}} + FLATPAK_BRANCH: beta steps: - name: Git checkout diff --git a/ci/github-build-flatpak.sh b/ci/github-build-flatpak.sh index df20a2fe..a1a5ab2d 100755 --- a/ci/github-build-flatpak.sh +++ b/ci/github-build-flatpak.sh @@ -14,26 +14,25 @@ sudo dnf install -y -q cmake flatpak-builder flatpak gcc-c++ tar # For now, horrible hack: aarch 64 builds are using the updated runtime # 20.08 and the opencpn beta version using same runtime. -case $(uname -m) in - arm64|aarch64) +if [ "$FLATPAK_BRANCH" = 'beta' ]; then flatpak install --user -y flathub org.freedesktop.Sdk//20.08 >/dev/null flatpak remote-add --user --if-not-exists flathub-beta \ https://flathub.org/beta-repo/flathub-beta.flatpakrepo flatpak install --user -y --or-update flathub-beta \ org.opencpn.OpenCPN >/dev/null sed -i '/sdk:/s/18.08/20.08/' flatpak/org.opencpn.*.yaml - ;; - *) +else flatpak install --user -y flathub org.freedesktop.Sdk//18.08 >/dev/null flatpak remote-add --user --if-not-exists flathub \ https://flathub.org/repo/flathub.flatpakrepo flatpak install --user -y --or-update flathub \ org.opencpn.OpenCPN >/dev/null - ;; -esac + FLATPAK_BRANCH='stable' +fi -# Patch the runtime version so it matches the nightly builds' -sed -i '/^runtime-version/s/:.*/: stable/' flatpak/$MANIFEST +# Patch the runtime version so it matches the nightly builds +# or beta as appropriate. +sed -i "/^runtime-version/s/:.*/: $FLATPAK_BRANCH/" flatpak/$MANIFEST # Configure and build the plugin tarball and metadata. mkdir build; cd build diff --git a/flatpak/org.opencpn.OpenCPN.Plugin.shipdriver.yaml b/flatpak/org.opencpn.OpenCPN.Plugin.shipdriver.yaml index a7c4373a..35034c59 100644 --- a/flatpak/org.opencpn.OpenCPN.Plugin.shipdriver.yaml +++ b/flatpak/org.opencpn.OpenCPN.Plugin.shipdriver.yaml @@ -1,3 +1,9 @@ +# +# Branches and runtimes: +# - master Nigthly builds, 18.08 runtime +# - beta Flathub beta branch, aarch64 with 20.08 runtime. +# - stable Flathub main branch, x86_64 with 18.08 runtime. +# id: org.opencpn.OpenCPN.Plugin.shipdriver runtime: org.opencpn.OpenCPN runtime-version: stable # official build at flathub