2020-06-01 13:51:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
|
|
VERSION=`cat VERSION`
|
|
|
|
|
|
|
|
|
|
# Clone new code
|
|
|
|
|
git clone https://github.com/ProtonMail/proton-bridge.git
|
|
|
|
|
cd proton-bridge
|
2021-01-07 11:41:05 +00:00
|
|
|
git checkout v$VERSION
|
2020-06-01 13:51:24 +00:00
|
|
|
|
2022-11-06 05:15:08 +00:00
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
if [[ $ARCH == "armv7l" ]] ; then
|
|
|
|
|
# This is expected to fail, and we use the following patch to fix
|
|
|
|
|
make build-nogui || true
|
|
|
|
|
# For 32bit architectures, there was a overflow error on the parser
|
2022-01-01 18:41:44 +00:00
|
|
|
# This is a workaround for this problem found at:
|
|
|
|
|
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
|
|
|
|
|
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
|
|
|
|
|
fi
|
2022-11-06 05:15:08 +00:00
|
|
|
|
|
|
|
|
# Build
|
|
|
|
|
make build-nogui
|