-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
71 lines (61 loc) · 1.54 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
[tasks.fmt]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--check"]
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.build]
command = "cargo"
args = ["build"]
dependencies = ["format"]
[tasks.release]
command = "cargo"
args = ["build", "--release"]
[tasks.test]
command = "cargo"
args = ["nextest", "run"]
dependencies = ["build"]
[tasks.clippy]
command = "cargo"
args = ["clippy"]
[tasks.all]
dependencies = [
"fmt",
"set-version",
"build",
"clippy",
"test",
]
[tasks.set-version]
script_runner = "bash"
script = '''
sed -i "s/{#RELEASE_VERSION}/${RELEASE_VERSION}/" src/cli_helpers.rs
'''
[tasks.install-local]
script_runner = "bash"
dependencies = ["release"]
script = '''
mkdir -p ${DESTDIR}/usr/local/bin
sudo cp target/release/kinesis-tailr ${DESTDIR}/usr/local/bin/
echo Installed to ${DESTDIR}/usr/local/bin/kinesis-tailr
'''
[tasks.install]
script_runner = "bash"
dependencies = ["release"]
script = '''
mkdir -p ${DESTDIR}/usr/bin
cp target/release/kinesis-tailr ${DESTDIR}/usr/bin/
'''
[tasks.debian-pkg]
script_runner = "bash"
dependencies = ["install"]
script = '''
mkdir -p ${DESTDIR}/DEBIAN
cp build-aux/debian/control ${DESTDIR}/DEBIAN/
echo "Version: ${RELEASE_VERSION}" >> ${DESTDIR}/DEBIAN/control
cp build-aux/debian/postinst ${DESTDIR}/DEBIAN/
chmod 775 ${DESTDIR}/DEBIAN/postinst
dpkg-deb --build ${DESTDIR} kinesis-tailr-${RELEASE_VERSION}-x86_64.deb
md5sum kinesis-tailr-${RELEASE_VERSION}-x86_64.deb > kinesis-tailr-${RELEASE_VERSION}-x86_64.deb.md5sum
'''