cinderella

[unmaintained] simple CI engine
Log | Files | Refs | README | LICENSE

commit 1ce34ce0350aa1a3ecb9a9b408b532884cb9a773
parent 1896c49423cb6ff00f0eb46806801765e1200f03
Author: Stefan Koch <programming@stefan-koch.name>
Date:   Sat, 14 Dec 2019 14:59:13 +0100

prepare distinction between branches and tags

Diffstat:
Mhooks/post-update | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/hooks/post-update b/hooks/post-update @@ -9,7 +9,14 @@ echo "Current user: $user" source /home/$user/.bash_profile -branch=$(basename "$1") -echo "Will build branch $branch" +reftype=$(sed -n 's/[^\/]\+\/\([^\/]\+\)\/[^\/]\+/\1/p' <<< $1) +name=$(basename "$1") -nohup /opt/cinderella/cinderella run "$PWD" --branch "$branch" &>/dev/null & +if [ "$reftype" = "heads" ]; then + echo "Will build branch $name" + nohup /opt/cinderella/cinderella run "$PWD" --branch "$branch" &>/dev/null & +elif [ "$reftype" = "tags" ]; then + echo "tags not implemented, yet" +else + echo "Unknown ref type: $1" +fi