github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/bin/package_ios (about) 1 #!/bin/bash 2 3 ########################################################################### 4 # Packaging script which creates iOS framework (Swift compatible). 5 # 6 # Usage: 7 #> bin/package_ios <architecture> 8 # 9 # Package (specific architecture: arm64, amd64): 10 #> bin/package_ios arm64 11 12 set -e 13 14 source bin/helpers/output.sh 15 source bin/helpers/functions.sh 16 17 DIR_BUILD="build/package" 18 mkdir -p $DIR_BUILD 19 PACKAGE_FILE="${DIR_BUILD}/Mysterium.framework.zip" 20 DIR_TEMP=`mktemp -d ${DIR_BUILD}/${tempname}.XXXXXX` 21 DIR_FRAMEWORK="${DIR_TEMP}/Mysterium.framework" 22 23 docker run --rm \ 24 -v "$PWD"/$DIR_TEMP:/build \ 25 -v "$GOPATH"/.xgo-cache:/deps-cache:ro \ 26 -v "$GOPATH"/src:/ext-go/1/src:ro \ 27 -e OUT=Mysterium \ 28 -e FLAG_V=false \ 29 -e FLAG_X=false \ 30 -e FLAG_RACE=false \ 31 -e FLAG_TAGS=ios \ 32 -e FLAG_LDFLAGS="-w -s $(get_linker_ldflags)" \ 33 -e FLAG_BUILDMODE=default \ 34 -e TARGETS=ios/. \ 35 -e EXT_GOPATH=/ext-go/1 \ 36 -e GO111MODULE=off \ 37 mysteriumnetwork/xgo:1.13.1 github.com/mysteriumnetwork/node/mobile/mysterium 38 39 me=`whoami` 40 sudo chown -R $me ${DIR_FRAMEWORK} 41 cp -vp bin/package/ios/Info.plist ${DIR_FRAMEWORK}/Versions/A/Resources/Info.plist 42 43 (cd ${DIR_TEMP} && zip -r - .) > ${PACKAGE_FILE} 44 rm -rf ${DIR_TEMP} 45 46 print_success "iOS package '$PACKAGE_FILE' complete!"