forked from onsonr/sonr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (46 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
SHELL=/bin/bash
# Set this -->[/Users/xxxx/Sonr/]<-- to Folder of Sonr Repos
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
SCRIPTS_DIR=$(ROOT_DIR)/scripts
all: Makefile
@echo ''
@sed -n 's/^##//p ' $<
## Makefile
## > The following Makefile is used for various actions for the Sonr project.
##
## bind : Binds Android, iOS and Web for Plugin Path
bind: bind.ios bind.mac bind.android bind.web
## └─ android - Android AAR
bind.android:
TAR_COMPRESS=false && sh $(SCRIPTS_DIR)/bind.sh -a
## └─ ios - iOS Framework
bind.ios:
TAR_COMPRESS=false && sh $(SCRIPTS_DIR)/bind.sh -i
## └─ mac - Mac Framework
bind.mac:
TAR_COMPRESS=false && sh $(SCRIPTS_DIR)/bind.sh -m
## └─ web - WASM Framework
bind.web:
TAR_COMPRESS=false && sh $(SCRIPTS_DIR)/bind.sh -w
## └─ tar - Build All & Tar Compress
bind.tar:
TAR_COMPRESS=true && sh $(SCRIPTS_DIR)/bind.sh -a
TAR_COMPRESS=true && sh $(SCRIPTS_DIR)/bind.sh -i
TAR_COMPRESS=true && sh $(SCRIPTS_DIR)/bind.sh -w
## proto : Compiles Go Proto Files and pushes to Buf.Build
proto: proto.go proto.buf
## └─ go - Generate to x/*/types and thirdparty/types/*
proto.go:
ignite generate proto-go --yes
go mod tidy
@echo "✅ Generated Go Proto Files"
## └─ buf - Build and push to buf.build/sonr-io/blockchain
proto.buf:
cd $(ROOT_DIR)/proto && buf mod update && buf build && buf push
@echo "✅ Pushed Protos to Buf.Build"
## clean : Clean all artifacts and tidy
clean:
rm -rf ./build
rm -rf ./tmp
rm -rf ./dist
go mod tidy