-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (60 loc) · 3.52 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
59
60
61
62
63
64
65
66
67
68
69
70
71
# This is for .github/workflows.
.PHONY: release-mac-x86_64, release-mac-aarch64, release-linux, release-backend, release-linux-aarch64, release-android
#base_dir := $(shell pwd)
#export PROTOC := $(shell pwd)/protoc/bin
release-mac-x86_64:
mkdir protoc && cd protoc && wget https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-osx-x86_64.zip && unzip protoc-21.9-osx-x86_64.zip && sudo cp bin/protoc /usr/local/bin
cp -r protoc/include/* protobuf/
mkdir -p release
cd client && cargo build --release --target=x86_64-apple-darwin
strip client/target/x86_64-apple-darwin/release/fornet
otool -L client/target/x86_64-apple-darwin/release/fornet
strip client/target/x86_64-apple-darwin/release/fornet-cli
otool -L client/target/x86_64-apple-darwin/release/fornet-cli
cp client/target/x86_64-apple-darwin/release/fornet ./release/
cp client/target/x86_64-apple-darwin/release/fornet-cli ./release/
# brew install wget
release-mac-aarch64:
mkdir protoc && cd protoc && wget https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-osx-aarch_64.zip && unzip protoc-21.9-osx-aarch_64.zip && sudo cp bin/protoc /usr/local/bin
cp -r protoc/include/* protobuf/
mkdir -p release
cd client && cargo build --release --target=aarch64-apple-darwin
strip client/target/aarch64-apple-darwin/release/fornet
otool -L client/target/aarch64-apple-darwin/release/fornet
strip client/target/aarch64-apple-darwin/release/fornet-cli
otool -L client/target/aarch64-apple-darwin/release/fornet-cli
cp client/target/aarch64-apple-darwin/release/fornet ./release/
cp client/target/aarch64-apple-darwin/release/fornet-cli ./release/
release-linux-aarch64:
mkdir protoc && cd protoc && wget https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-aarch64.zip && unzip protoc-21.9-linux-aarch64.zip && sudo cp bin/protoc /usr/bin
cp -r protoc/include/* protobuf/
sudo apt-get install -y build-essential
mkdir release
cd client && cargo build --release --target=aarch64-unknown-linux-gnu
strip client/target/aarch64-unknown-linux-gnu/release/fornet
strip client/target/aarch64-unknown-linux-gnu/release/fornet-cli
cp client/target/aarch64-unknown-linux-gnu/release/fornet ./release/
cp client/target/aarch64-unknown-linux-gnu/release/fornet-cli ./release/
release-linux:
mkdir protoc && cd protoc && wget https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip && unzip protoc-21.9-linux-x86_64.zip && sudo cp bin/protoc /usr/bin
cp -r protoc/include/* protobuf/
sudo apt-get install -y build-essential
mkdir release
cd client && cargo build --release --target=x86_64-unknown-linux-gnu
strip client/target/x86_64-unknown-linux-gnu/release/fornet
strip client/target/x86_64-unknown-linux-gnu/release/fornet-cli
cp client/target/x86_64-unknown-linux-gnu/release/fornet ./release
cp client/target/x86_64-unknown-linux-gnu/release/fornet-cli ./release
#TODO
release-windows:
vcpkg install --triplet=x64-windows-static-md openssl
release-backend:
cd admin-web && npm ci && npm run build:prod && cd ../
cp -r admin-web/build/ command/docker/backend/web
cd backend && sbt universal:packageBin && cd ../
mkdir -p release
cp backend/target/universal/app-*.zip release/app.zip && cd release && unzip app.zip && rm app.zip
cp backend/target/universal/app-*.zip command/docker/backend/app.zip && cd command/docker/backend && unzip app.zip && rm app.zip && mv app-* app
release-android:
cargo install cargo-ndk
cd app && flutter pub get && flutter build apk