From ba1d0ea6f9cf4d375c83697ed09b150ff959f779 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 7 Aug 2024 19:00:55 +0200 Subject: [PATCH 1/3] Adjust CI to account for changed deb package name --- .forgejo/workflows/build+release.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 4f550d9..bf2b424 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -67,7 +67,9 @@ jobs: echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ") echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env - mv target/debian/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb + DEBIAN_NAME=-$(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ") + echo "DEBIAN_NAME=$DEBIAN_NAME" >> dist/build.env + mv target/debian/"$DEBIAN_NAME"_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/"$DEBIAN_NAME"_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb - name: Uploading Build Artifact uses: actions/upload-artifact@v3 @@ -107,10 +109,10 @@ jobs: run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload - name: Upload Debian Package to main @@ -118,10 +120,10 @@ jobs: run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload create-release: From 0fdbdf1fc9ab16459bdfcb11098f7e7b886a2db8 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 7 Aug 2024 19:03:29 +0200 Subject: [PATCH 2/3] Apply adjusted env format to more places --- .forgejo/workflows/build+release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index bf2b424..0d13a30 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -69,7 +69,7 @@ jobs: echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env DEBIAN_NAME=-$(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ") echo "DEBIAN_NAME=$DEBIAN_NAME" >> dist/build.env - mv target/debian/"$DEBIAN_NAME"_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/"$DEBIAN_NAME"_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb + mv target/debian/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb - name: Uploading Build Artifact uses: actions/upload-artifact@v3 From 2673e610da4c0c8873c343fef303027fb6c04336 Mon Sep 17 00:00:00 2001 From: Neshura Date: Wed, 7 Aug 2024 19:06:43 +0200 Subject: [PATCH 3/3] Apply adjusted env format to more places #2 --- .forgejo/workflows/build+release.yml | 8 ++++---- .forgejo/workflows/pull-requests.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 0d13a30..d97bbcb 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -109,10 +109,10 @@ jobs: run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ DEBIAN_NAME }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_'${{ DEBIAN_REF }}${{ DEBIAN_REV }}'_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ DEBIAN_NAME }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload - name: Upload Debian Package to main @@ -120,10 +120,10 @@ jobs: run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ DEBIAN_NAME }}_'"$DEBIAN_REF""$DEBIAN_REV"'_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_'${{ DEBIAN_REF }}${{ DEBIAN_REV }}'_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ DEBIAN_NAME }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload create-release: diff --git a/.forgejo/workflows/pull-requests.yml b/.forgejo/workflows/pull-requests.yml index 2e53c8e..2a83978 100644 --- a/.forgejo/workflows/pull-requests.yml +++ b/.forgejo/workflows/pull-requests.yml @@ -57,7 +57,7 @@ jobs: echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ") echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env - mv target/debian/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb + mv target/debian/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb - name: Uploading Build Artifact uses: actions/upload-artifact@v3