mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-10-18 19:30:29 +08:00
This removes the need to update them manually. Now they'll always be up to date. Signed-off-by: Lars Wirzenius <liw@liw.fi>
40 lines
571 B
Bash
Executable File
40 lines
571 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
message() {
|
|
echo "~~~json"
|
|
cargo run -q --bin cibtool -- message "$@" | jq .
|
|
echo "~~~"
|
|
}
|
|
|
|
while read -r line; do
|
|
case "$line" in
|
|
@PUSH)
|
|
message --kind=push
|
|
;;
|
|
@PATCH)
|
|
message --kind=patch
|
|
;;
|
|
@TRIGGERED)
|
|
message --kind=triggered
|
|
;;
|
|
@TRIGGEREDURL)
|
|
message --kind=triggered --info-url=https://ci.example.com/runid/log.html
|
|
;;
|
|
@SUCCESS)
|
|
message --kind=success
|
|
;;
|
|
@FAILURE)
|
|
message --kind=failure
|
|
;;
|
|
@*)
|
|
echo "Unknown directive: $line" 1>&2
|
|
a exit 1
|
|
;;
|
|
*)
|
|
echo "$line"
|
|
;;
|
|
esac
|
|
done <messages.txt
|