├── Assets └── terminal_screenshot.jpg ├── LICENSE ├── README.md └── firebase-upload-symbols.sh /Assets/terminal_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs4alhaider/firebase-upload-symbols/f5c35e3e2f9f6870ec2cee8968ddbfa4e2818dd2/Assets/terminal_screenshot.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Abdullah Alhaider 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # firebase-upload-symbols 2 | Upload symbols tool to upload dSYMs files to Firebase for processing 3 | 4 | --- 5 | #### Note, if you wish to build a macOS app to have a GUI, you can achieve that by using [Scriptable](https://github.com/cs4alhaider/Scriptable). 6 | --- 7 | 8 | | Example Terminal window | 9 | | --- | 10 | | ![](Assets/terminal_screenshot.jpg) | 11 | 12 | 13 | ## Before using 14 | 15 | If you want to use pre-saved settings, make sure to change those values in `firebase-upload-symbols.sh` file 16 | ```shell 17 | # Change path to dSYM folder 18 | SAVED_dSYM_FOLDER="/Users/..../appDsyms" 19 | 20 | # for example: 652ac70afbbde134719v4as01415fa9793da901f 21 | SAVED_FABRIC_API_KEY="HERE_YOU_NEED_TO_ADD_FABRIC_API_KEY_IF_YOU_USE_FABRIC" 22 | 23 | # Change path to Fabric upload script for your project 24 | SAVED_UPLOAD_SCRIPT="/Users/..../Pods/Fabric/upload-symbols" 25 | 26 | # Change path to Google services info for your project 27 | SAVED_GOOGLE_CONFIG="/Users/.../GoogleService-Info.plist" 28 | ``` 29 | 30 | 31 | ## Author 32 | 33 | Abdullah Alhaider [Twitter](https://twitter.com/cs4alhaider). 34 | 35 | 36 | ## License 37 | 38 | This project is under the MIT license. See the LICENSE file for more info. 39 | -------------------------------------------------------------------------------- /firebase-upload-symbols.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # firebase-upload-symbols.sh 4 | # Created by Abdullah Alhaider on 18/4/20. 5 | # 6 | # TEMPLATE ONLY 7 | # COMPLETE LINES 14, 17, 20 AND 23 BEFORE USING 8 | # 9 | # This script uploads dSYMs to Firebase for processing. 10 | # 11 | 12 | 13 | # Change path to dSYM folder 14 | SAVED_dSYM_FOLDER="/Users/..../appDsyms" 15 | 16 | # for example: 652ac70afbbde134719v4as01415fa9793da901f 17 | SAVED_FABRIC_API_KEY="HERE_YOU_NEED_TO_ADD_FABRIC_API_KEY_IF_YOU_USE_FABRIC" 18 | 19 | # Change path to Fabric upload script for your project 20 | SAVED_UPLOAD_SCRIPT="/Users/..../Pods/Fabric/upload-symbols" 21 | 22 | # Change path to Google services info for your project 23 | SAVED_GOOGLE_CONFIG="/Users/.../GoogleService-Info.plist" 24 | 25 | 26 | ####################################################################################### 27 | ################################ Script ################################ 28 | ####################################################################################### 29 | 30 | ARCHIVE=$1 31 | 32 | function fabric_with_saved_setting() { 33 | log "============== Start Uploading... ==============" 34 | find "$SAVED_dSYM_FOLDER" -name "*.dSYM" | xargs -I \{\} $SAVED_UPLOAD_SCRIPT -a $SAVED_FABRIC_API_KEY -p ios \{\} 35 | log "================ Upload complete ================" 36 | }; 37 | 38 | function fabric_without_saved_setting() { 39 | read -p "Enter your Fabric API key, must be equal to 40 character: " FABRIC_API_KEY 40 | read -p "Enter full path for dSYM folder: " dSYMFOLDER 41 | read -p "Enter full path for upload script: " UPLOADSCRIPT 42 | log "============== Start Uploading... ==============" 43 | find "$dSYMFOLDER" -name "*.dSYM" | xargs -I \{\} $UPLOADSCRIPT -a $FABRIC_API_KEY -p ios \{\} 44 | log "================ Upload complete ================" 45 | }; 46 | 47 | function upload_to_fabric() { 48 | if [ "$1" = "y" ]; 49 | then 50 | fabric_with_saved_setting; 51 | elif [ "$1" = "n" ]; 52 | then 53 | fabric_without_saved_setting 54 | else 55 | log "Wrong input!, please re-run again" 56 | exist 1 57 | fi 58 | } 59 | 60 | function google_service_with_saved_setting() { 61 | log "============== Start Uploading... ==============" 62 | find "$SAVED_dSYM_FOLDER" -name "*.dSYM" | xargs -I \{\} $SAVED_UPLOAD_SCRIPT -gsp $SAVED_GOOGLE_CONFIG -p ios \{\} 63 | log "================ Upload complete ================" 64 | }; 65 | 66 | function google_service_without_saved_setting() { 67 | read -p "Enter your GoogleInfo.plit path: " GOOGLE_CONFIG 68 | read -p "Enter full path for dSYM folder: " dSYMFOLDER 69 | read -p "Enter full path for upload script: " UPLOADSCRIPT 70 | log "============== Start Uploading... ==============" 71 | find "$dSYMFOLDER" -name "*.dSYM" | xargs -I \{\} $UPLOADSCRIPT -gsp $GOOGLE_CONFIG -p ios \{\} 72 | log "================ Upload complete ================" 73 | }; 74 | 75 | function upload_to_firebase() { 76 | if [ "$1" = "y" ]; 77 | then 78 | google_service_with_saved_setting; 79 | elif [ "$1" = "n" ]; 80 | then 81 | google_service_without_saved_setting 82 | else 83 | log "Wrong input!, please re-run again" 84 | exist 1 85 | fi 86 | } 87 | 88 | function log() { 89 | echo "> $1" 90 | } 91 | 92 | welcome() { 93 | echo " 94 | ########################################################### 95 | ########################################################### 96 | =========== ========== 97 | =========== firebase upload symbols tool ========== 98 | =========== ========== 99 | =========== by ========== 100 | =========== ========== 101 | =========== Abdullah Alhaider ========== 102 | =========== ========== 103 | =========== https://github.com/cs4alhaider ========== 104 | =========== ========== 105 | ########################################################### 106 | ########################################################### 107 | " 108 | } 109 | 110 | function run() { 111 | welcome 112 | # The "-d" of if checks if a directory exists 113 | if [ -d $ARCHIVE ]; 114 | then 115 | 116 | # log "${ARCHIVE}" 117 | log "What method you would like to use?" 118 | log "1️⃣ Fabric" 119 | log "2️⃣ GoogleService-Info.plist" 120 | log "================================================" 121 | 122 | read -p "Enter your option [1/2]: " uploadmethod 123 | read -p "Would you like to use pre-saved setting? [y/n]: " use_pre_saved_setting 124 | 125 | if [ "$uploadmethod" = "1" ]; 126 | then 127 | upload_to_fabric "$use_pre_saved_setting" 128 | elif [ "$uploadmethod" = "2" ]; 129 | then 130 | upload_to_firebase "$use_pre_saved_setting" 131 | else 132 | log "No option found for $uploadmethod" 133 | exist 3 134 | fi 135 | else 136 | log "Archive does not exist!" 137 | fi 138 | } 139 | 140 | run --------------------------------------------------------------------------------