From 10ba06e79b8a4ad75fcb8b78dd3170c1e460e759 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 12 Sep 2024 11:40:39 -0400 Subject: [PATCH] Generate dependencies.conf file and upload to signal-desktop packages --- .forgejo/workflows/generate-webrtc.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/generate-webrtc.yml b/.forgejo/workflows/generate-webrtc.yml index 361937dd4b7..7b65811448c 100644 --- a/.forgejo/workflows/generate-webrtc.yml +++ b/.forgejo/workflows/generate-webrtc.yml @@ -37,9 +37,20 @@ jobs: else CI_REF_NAME=$GITHUB_REF_NAME fi - curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$CI_REF_NAME/package-lock.json | grep "@signalapp/ringrtc\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' > ringrtcver + curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$CI_REF_NAME/package-lock.json | grep "@signalapp/ringrtc\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1 > ringrtcver + curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$CI_REF_NAME/package-lock.json | grep "@signalapp/libsignal-client\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1 > libsignalver + curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$CI_REF_NAME/package-lock.json | grep "@signalapp/better-sqlite3\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1 > bsqlitever + read _bsqlitever < bsqlitever + curl --silent https://raw.githubusercontent.com/signalapp/better-sqlite3/v$_bsqlitever/deps/download.js | grep "const TOKENIZER_VERSION" | awk '{print $4}' | tr -d "'" | tr -d ';' | head -n 1 > _stokenizerver read _ringrtcver < ringrtcver - curl --silent https://raw.githubusercontent.com/signalapp/ringrtc/v$_ringrtcver/config/version.properties | awk -F '=' '{if($1 == "webrtc.version"){print $2}}' > webrtcver + curl --silent https://raw.githubusercontent.com/signalapp/ringrtc/v$_ringrtcver/config/version.properties | awk -F '=' '{if($1 == "webrtc.version"){print $2}}' | head -n 1 > webrtcver + read _libsignalver < libsignalver + read _webrtcver < webrtcver + read _stokenizerver < stokenizerver + echo "_libsignalver=$_libsignalver" > dependencies.conf + echo "_ringrtcver=$_ringrtcver" >> dependencies.conf + echo "_webrtcver=$_webrtcver" >> dependencies.conf + echo "_stokenizerver=$_stokenzerver" >> dependencies.conf - name: Fetching webrtc run: | read _webrtcver < webrtcver @@ -69,6 +80,7 @@ jobs: run: | read _webrtcver < webrtcver echo "Sending to ${{ github.server_url }}/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst" - curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst ${{ github.server_url }}/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst - curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst.sha512sum - curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst.sha256sum ${{ github.server_url }}/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst.sha256sum + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst ${{ github.server_url }}/api/packages/mirrors/generic/signal-desktop/$CI_REF_NAME/webrtc-$_webrtcver.tar.zst + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/signal-desktop/$CI_REF_NAME/webrtc-$_webrtcver.tar.zst.sha512sum + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file webrtc-*.tar.zst.sha256sum ${{ github.server_url }}/api/packages/mirrors/generic/signal-desktop/$CI_REF_NAME/webrtc-$_webrtcver.tar.zst.sha256sum + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file dependencies.conf ${{ github.server_url }}/api/packages/mirrors/generic/signal-desktop/$CI_REF_NAME/dependencies.conf