blob: a1dccc3455a6ddd30f07957d9bb8119b8b26d2c7 (
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
|
#!/usr/bin/env bash
#
# a simple ci that saves its results in a git note, formatted according to
# RFC-2822, more or less.
#
##
set -euo pipefail
[[ -n $(git status -s) ]] && { echo fail: dirty worktree; exit 1; }
##
at=$(date -R)
user=$(git config --get user.name)
mail=$(git config --get user.email)
##
if lint "${BIZ_ROOT:?}"/**/*
then
lint_result="good"
else
lint_result="fail"
fi
##
git notes --ref=ci append -m "Lint-is: $lint_result"
git notes --ref=ci append -m "Lint-by: $user <$mail>"
git notes --ref=ci append -m "Lint-at: $at"
##
if bild --test "${BIZ_ROOT:?}"/**/*
then
test_result="good"
else
test_result="fail"
fi
##
git notes --ref=ci append -m "Test-is: $test_result"
git notes --ref=ci append -m "Test-by: $user <$mail>"
git notes --ref=ci append -m "Test-at: $at"
##
|