Преглед изворни кода

Add argument to build script that enables private plugins

This allows devs to more easily build with private plugins while working in the master branch (which is the norm for us).
Adam Pritchard пре 9 година
родитељ
комит
6ec4d2e831
1 измењених фајлова са 11 додато и 0 уклоњено
  1. 11 0
      MobileLibrary/iOS/build-psiphon-framework.sh

+ 11 - 0
MobileLibrary/iOS/build-psiphon-framework.sh

@@ -1,5 +1,15 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 
 
+# This script takes one optional argument: 'private', if private plugins should
+# be used. It should be omitted if private plugins are not desired.
+if [[ $1 == "private" ]]; then
+  FORCE_PRIVATE_PLUGINS=true
+  echo "TRUE"
+else
+  FORCE_PRIVATE_PLUGINS=false
+  echo "FALSE"
+fi
+
 # -x echos commands. -u exits if an unintialized variable is used.
 # -x echos commands. -u exits if an unintialized variable is used.
 # -e exits if a command returns an error.
 # -e exits if a command returns an error.
 set -x -u -e
 set -x -u -e
@@ -31,6 +41,7 @@ FRAMEWORK_BINARY="${INTERMEDIATE_OUPUT_DIR}/${INTERMEDIATE_OUPUT_FILE}/Versions/
 # The "OPENSSL" tag enables support of OpenSSL for use by IndistinguishableTLS.
 # The "OPENSSL" tag enables support of OpenSSL for use by IndistinguishableTLS.
 
 
 PRIVATE_PLUGINS_TAG=""
 PRIVATE_PLUGINS_TAG=""
+if [[ ${FORCE_PRIVATE_PLUGINS} == true ]]; then PRIVATE_PLUGINS_TAG="PRIVATE_PLUGINS"; fi
 BUILD_TAGS="OPENSSL IOS ${PRIVATE_PLUGINS_TAG}"
 BUILD_TAGS="OPENSSL IOS ${PRIVATE_PLUGINS_TAG}"
 
 
 LIBSSL=${BASE_DIR}/OpenSSL-for-iPhone/lib/libssl.a
 LIBSSL=${BASE_DIR}/OpenSSL-for-iPhone/lib/libssl.a