Browse Source

[ci skip] Drop yq usage

Armin Schrenk 1 year ago
parent
commit
38670838c7
1 changed files with 4 additions and 6 deletions
  1. 4 6
      .github/workflows/flathub.yml

+ 4 - 6
.github/workflows/flathub.yml

@@ -53,13 +53,11 @@ jobs:
       - name: Checkout release branch
         run: |
           git checkout -b release/${{ needs.get-version.outputs.semVerStr }}
-      - name: Update build file with yq
+      - name: Update build file
         run: |
-          wget --no-verbose https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq && chmod +x yq
-          ./yq -i eval '(.modules[] | select(.name == "cryptomator") | .build-options.env.VERSION) = "${{ needs.get-version.outputs.semVerStr }}"' org.cryptomator.Cryptomator.yaml
-          ./yq -i eval '(.modules[] | select(.name == "cryptomator") | .sources[] | select(.type == "archive" and .url = "https://github.com/cryptomator/cryptomator/archive*") | .url) = "${{ needs.tarball.outputs.url }}"' org.cryptomator.Cryptomator.yaml
-          ./yq -i eval '(.modules[] | select(.name == "cryptomator") | .sources[] | select(.type == "archive" and .url = "https://github.com/cryptomator/cryptomator/archive*") | .sha512) = "${{ needs.tarball.outputs.sha512 }}"' org.cryptomator.Cryptomator.yaml
-          rm yq
+          sed -i -e 's/VERSION: [0-9]\+\.[0-9]\+\.[0-9]\+.*/VERSION: ${{ needs.get-version.outputs.semVerStr }}/g' org.cryptomator.Cryptomator.yaml
+          sed -i -e 's/sha512: [0-9A-Za-z_-\+]\{128\} #CRYPTOMATOR/sha512: ${{ needs.tarball.outputs.sha512 }} #CRYPTOMATOR/g' org.cryptomator.Cryptomator.yaml
+          sed -i -e 's;url: https://github.com/cryptomator/cryptomator/archive/refs/tags/[^[:blank:]]\+;url: ${{ needs.tarball.outputs.url }};g' org.cryptomator.Cryptomator.yaml
       - name: Commit and push
         run: |
           git config user.name "${{ github.actor }}"