Initial commit for http rest bridge

This commit is contained in:
Xiaonan Shen
2022-05-04 18:15:28 +08:00
parent 22b04d941d
commit 46b3cf35a4
21 changed files with 518 additions and 249 deletions

31
build.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
set -ex
VERSION=`cat VERSION`
# Clone new code
git clone https://github.com/ProtonMail/proton-bridge.git
cd proton-bridge
git checkout v$VERSION
ls /build
# Patch HTTP REST frontend
rm -rf internal/frontend/cli
cp -r /build/http_rest_frontend/cli internal/frontend/cli
# Build
if ! make build-nogui ; then
# If build fails it's probably because it is a 32bit
# system and there was a overflow error on the parser
# 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' {} +
# Try again after implementing the workaround
# make build-nogui
uname -m
exit 1
fi