-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
100 lines (86 loc) · 1.88 KB
/
Makefile.toml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
[env]
TWEMOJI_REPO = "https://github.com/jdecked/twemoji.git"
TWEMOJI_TAG = "v15.1.0"
EMOJIBASE_REPO = "https://github.com/milesj/emojibase.git"
[tasks.default]
alias = "prepare"
[[tasks.prepare.run_task]]
name = [
"cleanup_moved",
"clone_twemoji",
"clone_emojibase",
"move",
"cleanup_sources",
"generate",
"build",
"test",
"doc"
]
[tasks.clone_twemoji]
command = "git"
args = [
"clone",
"${TWEMOJI_REPO}",
"--branch", "${TWEMOJI_TAG}",
"--depth", "1"
]
[tasks.clone_emojibase]
command = "git"
args = [
"clone",
"${EMOJIBASE_REPO}",
"--depth", "1"
]
[tasks.move.windows]
script_runner = "@shell"
script = '''
move twemoji\assets assets
move emojibase\packages\data\en\shortcodes\emojibase.raw.json emojibase.shortcodes.json
move emojibase\packages\data\en\data.raw.json emojibase.data.json
'''
[tasks.move.linux]
script_runner = "@shell"
script = '''
mv twemoji/assets assets
mv emojibase/packages/data/en/shortcodes/emojibase.raw.json emojibase.shortcodes.json
mv emojibase/packages/data/en/data.raw.json emojibase.data.json
'''
[tasks.generate]
install_crate = { crate_name = "rust-script" }
command = "rust-script"
args = ["gen.rs"]
[tasks.build]
command = "cargo"
args = ["build", "--all-features"]
[tasks.test]
command = "cargo"
args = ["test", "--all-features"]
[tasks.doc]
command = "cargo"
args = ["doc", "--all-features"]
[tasks.cleanup_sources.windows]
script_runner = "@shell"
script = '''
rmdir twemoji /s /q
rmdir emojibase /s /q
'''
[tasks.cleanup_sources.linux]
script_runner = "@shell"
script = '''
rm -rf twemoji
rm -rf emojibase
'''
[tasks.cleanup_moved.windows]
script_runner = "@shell"
script = '''
rmdir assets /s /q
rm emojibase.shortcodes.json /q
rm emojibase.data.json /q
'''
[tasks.cleanup_moved.linux]
script_runner = "@shell"
script = '''
rm -rf twemoji
rm -f emojibase.shortcodes.json
rm - femojibase.data.json
'''