aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 4bfc37156ee530b9a4cdd311b1fad9e8f39ca831 (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
#!/bin/sh
# -*- coding: utf-8 -*-

basedir="$(realpath "$0" | xargs dirname)"

die()
{
    echo "=== ERROR: $*" >&2
    exit 1
}

[ -f "$basedir/Cargo.toml" ] || die "basedir sanity check failed"

cd "$basedir" || die "cd basedir failed."
export FEEDREADER_PREFIX="/opt/feedreader"
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/feeds \
    target/release/feedsd \
    || die "Cargo audit failed."

# vim: ts=4 sw=4 expandtab
bues.ch cgit interface