Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Commits
6623ae0c
Commit
6623ae0c
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add build-bindings.sh script
parent
ddb68a57
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!47
Update Bindings.xcframework
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
build-bindings.sh
+71
-0
71 additions, 0 deletions
build-bindings.sh
with
72 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
6623ae0c
...
...
@@ -7,3 +7,4 @@ DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
/.build-bindings
This diff is collapsed.
Click to expand it.
build-bindings.sh
0 → 100755
+
71
−
0
View file @
6623ae0c
#!/bin/sh
#=======================================
# Configuration
#=======================================
working_dir
=
"
$(
pwd
)
"
temp_dir
=
"
$(
dirname
$(
realpath
$0
))
/.build-bindings"
client_git_url
=
"https://gitlab.com/elixxir/client.git"
client_git_dir
=
"
$temp_dir
/client"
client_git_commit
=
"
$1
"
frameworks_dir
=
"
$(
dirname
$(
realpath
$0
))
/Frameworks"
#=======================================
# Helpers
#=======================================
message
()
{
local
text
=
$1
echo
""
echo
"
\0
33[1;32m▶
${
text
}
\0
33[0m"
}
#=======================================
# Main script
#=======================================
set
-e
if
[
!
-n
"
$client_git_commit
"
]
;
then
echo
"Invalid option. Usage:"
echo
" build-bindings.sh COMMIT_HASH - Build Bindings from provided commit"
exit
1
fi
message
"Go version..."
go version
if
[
!
-d
"
$client_git_dir
"
]
;
then
message
"Cloning client repo..."
git clone
$client_git_url
$client_git_dir
else
message
"Updating client repo..."
cd
$client_git_dir
git reset
--hard
git fetch origin
cd
$working_dir
fi
message
"Checkout commit
$client_git_commit
..."
cd
$client_git_dir
git switch
--detach
$client_git_commit
git reset
--hard
message
"Build client..."
go mod tidy
rm
-rf
vendor/
go build ./...
message
"Make Bindings.xcframework..."
go get golang.org/x/mobile/bind
go
install
golang.org/x/mobile/cmd/gomobile@latest
gomobile init
gomobile
bind
-target
ios gitlab.com/elixxir/client/bindings
message
"Move framework..."
cd
$working_dir
rm
-rf
"
$frameworks_dir
/Bindings.xcframework"
mv
"
$client_git_dir
/Bindings.xcframework"
"
$frameworks_dir
/"
message
"Done."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment