summaryrefslogtreecommitdiffhomepage
path: root/gui/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'gui/scripts')
-rwxr-xr-xgui/scripts/build-proto.sh10
-rwxr-xr-xgui/scripts/build_mi_proto.sh20
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"