forked from scoville/tailwind-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (31 loc) · 1.17 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
.PHONY: setup release clean clean-all
setup:
cargo install cross
npm install -g yarn
release: setup
# Make release directory
mkdir -p releases
# Build node native binary for unsupported platforms
yarn release-pyaco-node
# Build binaries for all mainstream platforms
cross build --release --target x86_64-pc-windows-gnu
cargo build --release --target x86_64-apple-darwin
cross build --release --target x86_64-unknown-linux-gnu
# Create folders for the binary
mkdir -p ./builds/pyaco-win64
mkdir -p ./builds/pyaco-macos
mkdir -p ./builds/pyaco-linux
# Copy the binaries into the right folder
cp ./target/x86_64-pc-windows-gnu/release/pyaco.exe ./builds/pyaco-win64/pyaco.exe
cp ./target/x86_64-apple-darwin/release/pyaco ./builds/pyaco-macos/pyaco
cp ./target/x86_64-unknown-linux-gnu/release/pyaco ./builds/pyaco-linux/pyaco
# Tar binaries (except for the native node one)
tar -C ./builds -czvf ./releases/pyaco-win64.tar.gz pyaco-win64
tar -C ./builds -czvf ./releases/pyaco-macos.tar.gz pyaco-macos
tar -C ./builds -czvf ./releases/pyaco-linux.tar.gz pyaco-linux
# Cleanup builds folder
rm -fr ./builds
clean:
rm -fr builds releases
clean-all: clean
rm -fr target