summaryrefslogtreecommitdiffhomepage
path: root/gui/scripts
diff options
context:
space:
mode:
authorAndrii Yurchuk <ay@mntw.re>2021-02-25 11:04:53 +0100
committerAndrii Yurchuk <ay@mntw.re>2021-02-26 19:03:01 +0100
commit7f8939e5f44346c1b38bea3a6531c12ff5f8b972 (patch)
tree3fcaa30b320952f8fbdbfbae8d57cbc8a3b400f3 /gui/scripts
parentc35855ae08b1856014836a122b634b0fe0bd9011 (diff)
downloadmullvadvpn-7f8939e5f44346c1b38bea3a6531c12ff5f8b972.tar.xz
mullvadvpn-7f8939e5f44346c1b38bea3a6531c12ff5f8b972.zip
Move build_mi_proto script and its artefacts to gui/scripts
Diffstat (limited to 'gui/scripts')
-rwxr-xr-xgui/scripts/build_mi_proto.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/scripts/build_mi_proto.sh b/gui/scripts/build_mi_proto.sh
new file mode 100755
index 0000000000..abfae36cbc
--- /dev/null
+++ b/gui/scripts/build_mi_proto.sh
@@ -0,0 +1,20 @@
+#!/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"