From cd2360dc0e97429353ce334db88d669ccec8a5de Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 27 Jan 2021 11:26:57 +0000 Subject: [PATCH] Update gobind build scripts --- build/gobind-pinecone/build.sh | 19 ++++++++++++++++++- build/gobind-yggdrasil/build.sh | 23 +++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/build/gobind-pinecone/build.sh b/build/gobind-pinecone/build.sh index 2dfa0178d..d94f0b07f 100644 --- a/build/gobind-pinecone/build.sh +++ b/build/gobind-pinecone/build.sh @@ -1,5 +1,22 @@ #!/bin/sh +TARGET="" + +while getopts "ai" option +do + case "$option" + in + a) TARGET="android";; + i) TARGET="ios";; + esac +done + +if [[ $TARGET = "" ]]; +then + echo "No target specified, specify -a or -i" + exit 1 +fi + gomobile bind -v \ - -target ios \ + -target $TARGET \ github.com/matrix-org/dendrite/build/gobind-pinecone \ No newline at end of file diff --git a/build/gobind-yggdrasil/build.sh b/build/gobind-yggdrasil/build.sh index 334cc03a2..a9889d8d2 100644 --- a/build/gobind-yggdrasil/build.sh +++ b/build/gobind-yggdrasil/build.sh @@ -1,6 +1,25 @@ #!/bin/sh +#!/bin/sh + +TARGET="" + +while getopts "ai" option +do + case "$option" + in + a) TARGET="android";; + i) TARGET="ios";; + esac +done + +if [[ $TARGET = "" ]]; +then + echo "No target specified, specify -a or -i" + exit 1 +fi + gomobile bind -v \ + -target $TARGET \ -ldflags "-X github.com/yggdrasil-network/yggdrasil-go/src/version.buildName=dendrite" \ - -target ios \ - github.com/matrix-org/dendrite/build/gobind-yggdrasil \ No newline at end of file + github.com/matrix-org/dendrite/build/gobind-pinecone \ No newline at end of file