blob: b8815b59e426fbcb18fbcbf44a2142ab578b1308 (
plain)
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
|
#!/bin/sh
# -*- coding: utf-8 -*-
basedir="$(realpath "$0" | xargs dirname)"
info()
{
echo "--- $*"
}
error()
{
echo "=== ERROR: $*" >&2
}
warning()
{
echo "=== WARNING: $*" >&2
}
die()
{
error "$*"
exit 1
}
[ -f "$basedir/Cargo.toml" ] ||\
die "basedir sanity check failed"
cd "$basedir" || die "cd basedir failed."
cargo build || die "Cargo build (debug) failed."
cargo test || die "Cargo test failed."
cargo auditable build --release || die "Cargo build (release) failed."
cargo audit --deny warnings bin \
target/release/cms-backd \
target/release/cms-cgi \
target/release/cms-fsd \
target/release/cms-postd \
|| die "Cargo audit failed."
# vim: ts=4 sw=4 expandtab
|