You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by mo...@apache.org on 2023/05/17 01:26:05 UTC

[apisix] branch master updated: build: add installation of rust when installing dependencies (#9467)

This is an automated email from the ASF dual-hosted git repository.

monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 070f15fe7 build: add installation of rust when installing dependencies (#9467)
070f15fe7 is described below

commit 070f15fe773f4d27df7a51996c5cc1da87951c6d
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Wed May 17 09:25:58 2023 +0800

    build: add installation of rust when installing dependencies (#9467)
---
 utils/install-dependencies.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/utils/install-dependencies.sh b/utils/install-dependencies.sh
index 11851cbae..6ddc25804 100755
--- a/utils/install-dependencies.sh
+++ b/utils/install-dependencies.sh
@@ -30,6 +30,11 @@ function detect_aur_helper() {
     fi
 }
 
+function install_rust() {
+    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo sh -s -- -y
+    source "$HOME/.cargo/env"
+}
+
 function install_dependencies_with_aur() {
     detect_aur_helper
     $AUR_HELPER -S openresty --noconfirm
@@ -63,6 +68,8 @@ function install_dependencies_with_yum() {
         # shellcheck disable=SC2086
         sudo yum install -y openresty $common_dep
     fi
+
+    install_rust
 }
 
 # Install dependencies on ubuntu and debian
@@ -85,6 +92,8 @@ function install_dependencies_with_apt() {
 
     # install OpenResty and some compilation tools
     sudo apt-get install -y git openresty curl openresty-openssl111-dev make gcc libpcre3 libpcre3-dev libldap2-dev unzip
+
+    install_rust
 }
 
 # Install dependencies on mac osx