Add option to fetch webrtc based on signal version
This commit is contained in:
parent
7b16bd03c0
commit
fb634f50c6
1 changed files with 20 additions and 5 deletions
|
@ -1,9 +1,13 @@
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
ref_name:
|
signalver:
|
||||||
|
description: 'signal tag or commit'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
webrtcver:
|
||||||
description: 'webrtc version'
|
description: 'webrtc version'
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
push:
|
push:
|
||||||
|
@ -32,17 +36,28 @@ jobs:
|
||||||
git checkout $DEPOT_TOOLS_VER
|
git checkout $DEPOT_TOOLS_VER
|
||||||
- name: Getting variables
|
- name: Getting variables
|
||||||
run: |
|
run: |
|
||||||
echo $GITHUB_REF_NAME
|
|
||||||
if test $GITHUB_REF_NAME == "ci" ; then
|
if test $GITHUB_REF_NAME == "ci" ; then
|
||||||
echo ${{ inputs.ref_name }} > webrtcver
|
_signalver=${{ inputs.signalver }}
|
||||||
|
_webrtcver=${{ inputs.webrtcver }}
|
||||||
else
|
else
|
||||||
curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$GITHUB_REF_NAME/package-lock.json | grep "@signalapp/ringrtc\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1 > ringrtcver
|
_signalver=$GITHUB_REF_NAME
|
||||||
|
fi
|
||||||
|
if [ -n "$_webrtcver" ]; then
|
||||||
|
echo "webrtcver set manually with $_webrtcver"
|
||||||
|
echo $_webrtcver > webrtcver
|
||||||
|
elif [ -z "$_signalver" ]; then
|
||||||
|
echo "When Signal commit" is unset, webrtc commit needs be set
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
echo "Fetching webrtcver for Signal version $_signalver"
|
||||||
|
curl --silent https://raw.githubusercontent.com/signalapp/Signal-Desktop/$_signalver/package-lock.json | grep "@signalapp/ringrtc\": \"" | awk '{print $2}' | tr -d ',' | tr -d '"' | head -n 1 > ringrtcver
|
||||||
read _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}}' | head -n 1 > 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
|
||||||
fi
|
fi
|
||||||
- name: Fetching webrtc
|
- name: Fetching webrtc
|
||||||
run: |
|
run: |
|
||||||
read _webrtcver < webrtcver
|
read _webrtcver < webrtcver
|
||||||
|
echo "Fetching webrtc $_webrtcver"
|
||||||
echo "solutions = [{'name': 'src','url': 'https://github.com/signalapp/webrtc.git@$_webrtcver',}]" > .gclient
|
echo "solutions = [{'name': 'src','url': 'https://github.com/signalapp/webrtc.git@$_webrtcver',}]" > .gclient
|
||||||
echo "target_cpu = ['x64', 'arm64']" >> .gclient
|
echo "target_cpu = ['x64', 'arm64']" >> .gclient
|
||||||
echo "target_cpu_only = True" >> .gclient
|
echo "target_cpu_only = True" >> .gclient
|
||||||
|
|
Loading…
Reference in a new issue