forked from helium/gateway-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
40 lines (35 loc) · 1.21 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
[env]
CROSS_TARGET = "${CARGO_MAKE_PROFILE}"
FEATURES = "ecc608"
BUILD_COMMAND = "cross"
TAR = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "linux", mapping = { macos = "gtar", linux = "tar" } }
[env.x86_64-unknown-debian-gnu]
CROSS_TARGET = "x86_64-unknown-linux-gnu"
CROSS_BUILD_DOCKERFILE = "./.github/cross-docker/Dockerfile-cross-debian-11"
[env.x86_64-tpm-debian-gnu]
CROSS_TARGET = "x86_64-unknown-linux-gnu"
CROSS_BUILD_DOCKERFILE = "./.github/cross-docker/Dockerfile-cross-debian-11"
FEATURES = "tpm"
[tasks.build]
description = "Runs the cross/cargo rust compiler."
condition = { env_set = ["CROSS_TARGET", "BUILD_COMMAND", "FEATURES"] }
workspace = false
command = "${BUILD_COMMAND}"
args = [
"build",
"--target",
"${CROSS_TARGET}",
"--no-default-features",
"--features",
"${FEATURES}",
"--release"
]
[tasks.pkg]
description = "Package application"
workspace = false
condition = { env_set = ["CARGO_MAKE_PROFILE", "CROSS_TARGET"]}
env = { PKG_NAME = "helium-gateway-${CARGO_MAKE_CRATE_VERSION}-${CARGO_MAKE_PROFILE}" }
script = '''
cp config/settings.toml target/${CROSS_TARGET}/release
${TAR} -zcv -C target/${CROSS_TARGET}/release -f ${PKG_NAME}.tar.gz helium_gateway settings.toml
'''