From cd45b624c2944998295d40d5f1f7e41fce972b7f Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 1 Aug 2024 15:34:28 +0200 Subject: wip --- Makefile | 12 ++++++++++++ post-receive.tmpl | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Makefile create mode 100644 post-receive.tmpl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0cd797 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: all install + +PREFIX?=/var/empty + +all: post-receive + @echo Done + +%: %.tmpl %.json + jinja2 --outfile=$@ --format=json $@.tmpl $@.json + +install: post-receive + cp post-receive ${PREFIX}/ diff --git a/post-receive.tmpl b/post-receive.tmpl new file mode 100644 index 0000000..5d80cce --- /dev/null +++ b/post-receive.tmpl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +hook_active= {{ active }} +remote_url= {{ ci_url }} + +if [ "$hook_active" == false ]; then + echo 'Notify ci hook is not active!' + exit -1 +fi + + -- cgit v1.2.3