diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..0f013f5 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,35 @@ +# EXAMPLE USAGE: +# +# Refer for explanation to following link: +# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md +# +# pre-push: +# commands: +# packages-audit: +# tags: frontend security +# run: yarn audit +# gems-audit: +# tags: backend security +# run: bundle audit +# +# pre-commit: +# parallel: true +# commands: +# eslint: +# glob: "*.{js,ts,jsx,tsx}" +# run: yarn eslint {staged_files} +# rubocop: +# tags: backend style +# glob: "*.rb" +# exclude: "application.rb|routes.rb" +# run: bundle exec rubocop --force-exclusion {all_files} +# govet: +# tags: backend style +# files: git ls-files -m +# glob: "*.go" +# run: go vet {files} +# scripts: +# "hello.js": +# runner: node +# "any.go": +# runner: go run diff --git a/scripts/compress_xcframework.sh b/scripts/compress_xcframework.sh new file mode 100644 index 0000000..57dad27 --- /dev/null +++ b/scripts/compress_xcframework.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Fail immediately on any substep failing. +set -euo pipefail + +ROOT_DIR=$(pwd) +XC_DIR=$ROOT_DIR/ios/WaasSdkGo.xcframework + +# Compress files that exceed Github Enterprise limit of 50MB. +cd $XC_DIR/ios-arm64/ && tar cf - WaasSdkGo.framework | gzip -9 - > WaasSdkGo.framework.tar.gz +cd $XC_DIR/ios-arm64-simulator && tar cf - WaasSdkGo.framework | gzip -9 - > WaasSdkGo.framework.tar.gz +cd $XC_DIR/ios-x86_64-simulator && tar cf - WaasSdkGo.framework | gzip -9 - > WaasSdkGo.framework.tar.gz \ No newline at end of file diff --git a/scripts/uncompress_xcframework.sh b/scripts/uncompress_xcframework.sh new file mode 100755 index 0000000..ec61ca4 --- /dev/null +++ b/scripts/uncompress_xcframework.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Fail immediately on any substep failing. +set -euo pipefail + +ROOT_DIR=$(pwd) +XC_DIR=$ROOT_DIR/ios/WaasSdkGo.xcframework + +tar -xvzf $XC_DIR/ios-arm64/WaasSdkGo.framework.tar.gz -C $XC_DIR/ios-arm64/ +tar -xvzf $XC_DIR/ios-arm64-simulator/WaasSdkGo.framework.tar.gz -C $XC_DIR/ios-arm64-simulator/ +tar -xvzf $XC_DIR/ios-x86_64-simulator/WaasSdkGo.framework.tar.gz -C $XC_DIR/ios-x86_64-simulator