Move all scripts to the scripts dir
This commit is contained in:
parent
df80d2e431
commit
52a8c4a401
5 changed files with 10 additions and 6 deletions
28
scripts/gopenpgp_build.sh
Executable file
28
scripts/gopenpgp_build.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euox pipefail
|
||||
|
||||
export GOPATH="$(pwd)/go"
|
||||
export PATH="$PATH:$GOPATH/bin"
|
||||
|
||||
PACKAGE_PATH="github.com/mssun/gopenpgp"
|
||||
GOPENPGP_REVISION="gnu-dummy"
|
||||
OUTPUT_PATH="$GOPATH/dist"
|
||||
|
||||
mkdir -p "$GOPATH"
|
||||
|
||||
go get golang.org/x/mobile/cmd/gomobile || true
|
||||
( cd "$GOPATH/src/golang.org/x/mobile/cmd/gomobile" && git checkout 0df4eb2385467a487d418c6358313e9e838256ae )
|
||||
GO111MODULE=on go get golang.org/x/mobile/cmd/gomobile@0df4eb2385467a487d418c6358313e9e838256ae || true
|
||||
GO111MODULE=on go get golang.org/x/mobile/cmd/gobind@0df4eb2385467a487d418c6358313e9e838256ae || true
|
||||
go get -u "$PACKAGE_PATH" || true
|
||||
|
||||
mkdir -p "$GOPATH/src/github.com/ProtonMail"
|
||||
ln -f -s "$GOPATH/src/$PACKAGE_PATH" "$GOPATH/src/github.com/ProtonMail/gopenpgp"
|
||||
|
||||
( cd "$GOPATH/src/$PACKAGE_PATH" && git checkout "$GOPENPGP_REVISION" && GO111MODULE=on go mod vendor )
|
||||
|
||||
mkdir -p "$OUTPUT_PATH"
|
||||
|
||||
"$GOPATH/bin/gomobile" bind -v -ldflags="-s -w" -target ios -o "${OUTPUT_PATH}/Crypto.framework" \
|
||||
"$PACKAGE_PATH"/{crypto,armor,constants,models,subtle}
|
||||
41
scripts/wcarthage
Executable file
41
scripts/wcarthage
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
# This script is a work around for Carthage bug with Xcode 12.
|
||||
# Source : https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
|
||||
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
|
||||
|
||||
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
|
||||
# the build will fail on lipo due to duplicate architectures.
|
||||
# Xcode 12 Beta 3:
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8169g = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12 beta 4
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8179i = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12 beta 5
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189h = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12 beta 6
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189n = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12 GM
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12.1 (12A7300)
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7300 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
# Xcode 12.1 (12A7403)
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7403 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
|
||||
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
|
||||
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
|
||||
|
||||
export XCODE_XCCONFIG_FILE="$xcconfig"
|
||||
|
||||
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
|
||||
# the build will fail on lipo due to duplicate architectures.
|
||||
|
||||
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
|
||||
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
|
||||
|
||||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
|
||||
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
|
||||
|
||||
export XCODE_XCCONFIG_FILE="$xcconfig"
|
||||
carthage "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue