diff options
| author | Andrii Yurchuk <ay@mntw.re> | 2021-02-26 11:35:11 +0100 |
|---|---|---|
| committer | Andrii Yurchuk <ay@mntw.re> | 2021-02-26 19:03:01 +0100 |
| commit | ec488538ac3f3ecdfd67eddd40df623580225a11 (patch) | |
| tree | c8125ae9c48f604103625060bc04ec937ac4c641 /gui/scripts | |
| parent | 7f8939e5f44346c1b38bea3a6531c12ff5f8b972 (diff) | |
| download | mullvadvpn-ec488538ac3f3ecdfd67eddd40df623580225a11.tar.xz mullvadvpn-ec488538ac3f3ecdfd67eddd40df623580225a11.zip | |
Remove build_mi_proto.sh. Update readme
Diffstat (limited to 'gui/scripts')
| -rwxr-xr-x | gui/scripts/build-proto.sh | 10 | ||||
| -rwxr-xr-x | gui/scripts/build_mi_proto.sh | 20 |
2 files changed, 5 insertions, 25 deletions
diff --git a/gui/scripts/build-proto.sh b/gui/scripts/build-proto.sh index 5a09d111e3..29e5f2793c 100755 --- a/gui/scripts/build-proto.sh +++ b/gui/scripts/build-proto.sh @@ -6,7 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" PLATFORM="$(uname -s)-$(uname -m)" -MI_PROTO_BUILD_DIR=${MI_PROTO_BUILD_DIR:-} +MANAGEMENT_INTERFACE_PROTO_BUILD_DIR=${MANAGEMENT_INTERFACE_PROTO_BUILD_DIR:-} NODE_MODULES_DIR="$(cd ../node_modules/.bin && pwd)" PROTO_DIR="../../mullvad-management-interface/proto" PROTO_FILENAME="management_interface.proto" @@ -22,14 +22,14 @@ mkdir -p $DESTINATION_DIR mkdir -p $TYPES_DESTINATION_DIR if [[ "${PLATFORM}" == "Darwin-arm64" ]]; then - if [[ -n "${MI_PROTO_BUILD_DIR}" ]]; then - cp $MI_PROTO_BUILD_DIR/*.js $DESTINATION_DIR - cp $MI_PROTO_BUILD_DIR/*.ts $TYPES_DESTINATION_DIR + if [[ -n "${MANAGEMENT_INTERFACE_PROTO_BUILD_DIR}" ]]; then + cp $MANAGEMENT_INTERFACE_PROTO_BUILD_DIR/*.js $DESTINATION_DIR + cp $MANAGEMENT_INTERFACE_PROTO_BUILD_DIR/*.ts $TYPES_DESTINATION_DIR else >&2 echo "Building management interface proto files on Apple Silicon is not supported" >&2 echo "(see https://github.com/grpc/grpc-node/issues/1497)." >&2 echo "Please build the proto files on another platform using build_mi_proto.sh script," - >&2 echo "and set MI_PROTO_BUILD_DIR environment variable to the directory of the build." + >&2 echo "and set MANAGEMENT_INTERFACE_PROTO_BUILD_DIR environment variable to the directory of the build." exit 1 fi else diff --git a/gui/scripts/build_mi_proto.sh b/gui/scripts/build_mi_proto.sh deleted file mode 100755 index abfae36cbc..0000000000 --- a/gui/scripts/build_mi_proto.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# This script is used to build the management interface proto files to later use them on the platforms -# unsupported by grpc-tools (e.g. Apple Silicon). - -set -eu - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -PROTO_BUILD_DIR="$SCRIPT_DIR/mi_proto" - -npm ci -npm run build-proto - -mkdir -p "$PROTO_BUILD_DIR" -cp $SCRIPT_DIR/../../gui/src/main/management_interface/* $PROTO_BUILD_DIR -cp $SCRIPT_DIR/../../gui/build/src/main/management_interface/* $PROTO_BUILD_DIR - -echo "" -echo "Management interface proto files built successfully." -echo "Build directory: $PROTO_BUILD_DIR" |
