This repository was archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (38 loc) · 1.44 KB
/
Makefile
File metadata and controls
47 lines (38 loc) · 1.44 KB
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
default: all
all: generate build
build:
@go build ./...
generate: generate-go generate-go-grpc
generate-go:
@for API_VERSION in $$(ls ./aurae/api | grep -v ".md"); do \
for PROTO_FILE in $$(ls "./aurae/api/$${API_VERSION}" | grep ".proto"); do \
protoc \
-I"./aurae/api/$${API_VERSION}" \
--go_out=./pkg/api/$${API_VERSION}/$${PROTO_FILE%.*} \
--go_opt=paths=source_relative \
./aurae/api/$${API_VERSION}/$${PROTO_FILE}; \
done; \
done
generate-go-grpc:
@for API_VERSION in $$(ls ./aurae/api | grep -v ".md"); do \
for PROTO_FILE in $$(ls "./aurae/api/$${API_VERSION}" | grep ".proto"); do \
protoc \
-I"./aurae/api/$${API_VERSION}" \
--go-grpc_out=./pkg/api/$${API_VERSION}/$${PROTO_FILE%.*} \
--go-grpc_opt=paths=source_relative \
./aurae/api/$${API_VERSION}/$${PROTO_FILE}; \
done; \
done
submodules: submodule ## Alias for submodule
submodule: ## Initialize all submodules
@echo "Initializing submodules"
@echo ""
@read -p "Warning: This will destroy all work in subdirectories! Press any key to continue." FOO
# aurae
@if [ -d /tmp/aurae ]; then rm -rvf /tmp/aurae; fi
@if [ -d aurae ]; then mv -v aurae /tmp/aurae; fi
# Init and update
@git submodule update --init --recursive
@git submodule update --remote --rebase
# Attach to main
cd aurae && git checkout main && git branch && git pull origin main