From 3de6b5d38a45227ac73a6d33ba51cfa5fdc9f4bf Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 9 Sep 2024 20:42:56 -0400 Subject: [PATCH] Rework read comand --- .forgejo/workflows/generate-webrtc.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/generate-webrtc.yml b/.forgejo/workflows/generate-webrtc.yml index 7e68bc400da..0029fe7de3b 100644 --- a/.forgejo/workflows/generate-webrtc.yml +++ b/.forgejo/workflows/generate-webrtc.yml @@ -28,7 +28,7 @@ jobs: git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ./ git fetch --depth 1 origin $DEPOT_TOOLS_VER git checkout $DEPOT_TOOLS_VER - - name: Fetching webrtc + - name: Getting variables run: | if test $GITHUB_REF_NAME == "ci" ; then CI_REF_NAME=${{ inputs.ref_name }} @@ -36,35 +36,36 @@ jobs: 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 - read -d $'\x04' _ringrtcver < ringrtcver + 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 - read -d $'\x04' _webrtcver < webrtcver + - name: Fetching webrtc + run: | + read _webrtcver < webrtcver echo "solutions = [{'name': 'src','url': 'https://github.com/signalapp/webrtc.git@$_webrtcver',}]" > .gclient echo "target_cpu = ['x64', 'arm64']" >> .gclient echo "target_cpu_only = True" >> .gclient ./gclient sync --no-history --nohooks - name: Preparing source run: | - read -d $'\x04' _webrtcver < webrtcver + read _webrtcver < webrtcver python3 'src/build/landmines.py' --landmine-scripts 'src/tools_webrtc/get_landmines.py' --src-dir 'src' python3 'src/build/util/lastchange.py' -o 'src/build/util/LASTCHANGE' scanelf -RA -F "%F" src > elf.list while read file; do rm -f "$file"; done < elf.list - read -d $'\x04' _webrtcver < webrtcver mv src webrtc-$_webrtcver - name: Packaging source run: | - read -d $'\x04' _webrtcver < webrtcver + read _webrtcver < webrtcver tar -cf webrtc-$_webrtcver.tar --exclude="ChangeLog*" --exclude="testdata/" --exclude="test_data/" --exclude="android_rust_toolchain/toolchain/" --exclude="base/" --exclude-backups --exclude-caches-all --exclude-vcs webrtc-$_webrtcver zstd --auto-threads=logical --ultra --long -22 -T"$ZSTD_LIMIT" -vv webrtc-$_webrtcver.tar -o webrtc-$_webrtcver.tar.zst - name: Computing checksums run: | - read -d $'\x04' _webrtcver < webrtcver + read _webrtcver < webrtcver sha512sum webrtc-$_webrtcver.tar.zst > webrtc-$_webrtcver.tar.zst.sha512sum sha256sum webrtc-$_webrtcver.tar.zst > webrtc-$_webrtcver.tar.zst.sha256sum - name: Package deployment run: | - read -d $'\x04' _webrtcver < webrtcver + read _webrtcver < webrtcver curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/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 ./tarball/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 ./tarball/webrtc-*.tar.zst.sha256sum ${{ github.server_url }}/api/packages/mirrors/generic/webrtc/$_webrtcver/webrtc-$_webrtcver.tar.zst.sha256sum