aboutsummaryrefslogtreecommitdiff
path: root/Makefile.toml
blob: c6b5a2efe5c27dbd35d2e9405ce762c22a10deea (plain) (blame)
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
[config]
default_to_workspace = false

[tasks.fmt]
script_runner = "python"
script_extension = "py"
script = '''
import glob
import subprocess

rustfmt_arguments = [
  "rustfmt",
  "--unstable-features",
  "--skip-children",
  "./build.rs"
]

rustfmt_arguments.extend(glob.glob("./src/**/*.rs", recursive=True))
rustfmt_arguments.extend(glob.glob("./amenadiel/**/*.rs", recursive=True))

subprocess.run(rustfmt_arguments, shell=True)
'''
toolchain = "nightly"

[tasks.check]
args = ["check", "--all-features"]
command = "cargo"

[tasks.clippy]
args = ["clippy", "--all-features"]
command = "cargo"

[tasks.checkf]
dependencies = ["fmt", "check"]

[tasks.checkfc]
dependencies = ["fmt", "check", "clippy"]

[tasks.genkey]
command = "openssl"
args = [
  "req",
  "-new",
  "-subj",
  "/CN=fuwn.me",
  "-x509",
  "-newkey",
  "ec",
  "-pkeyopt",
  "ec_paramgen_curve:prime256v1",
  "-days",
  "365",
  "-nodes",
  "-out",
  ".locus/locus_public.pem",
  "-keyout",
  ".locus/locus_private.pem",
  "-inform",
  "pem",
]

[tasks.run]
dependencies = ["checkfc"]
command = "cargo"
args = ["run", "--", "{@}"]

[tasks.docker-build]
dependencies = ["checkfc"]
command = "docker"
args = ["build", "-t", "fuwn/locus:latest", "."]