From 9e006275150cde0c1102b11701481597fcd6527d Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Jul 2024 14:42:06 +0200 Subject: Drop Git hook logic This might be re-used later but the new goal is to make craft an independent build automation tool or service which might be called by a later provided git hook. Nevertheless the primary target for now is to build something which executes a build based on a repository reference but not triggered by a Git hook. --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f9acd86..715e6c6 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,14 @@ required. ## Usage -Craft is used as a Git hook. It can be enabled for a given Git repository and -hook by creating a symbolic link: +Call the `craft` tool like this: ``` -ln -s path/to/craft path/to/repository/.git/hooks/post-receive +./craft -repo https://example.com -commit 8f36088eee1cfbec4ddac4d652101db3b29eed45 ``` -Currently only the `post-receive` hook is supported. This can be performed also -with a bare repository: +This will create a temporary directory, clone the repository including +submodules to that location, execute the `build` function from the `craft.sh` +file inside the root of the repo and remove the temporary directory. -``` -ln -s path/to/craft path/to/bare/repository.git/hooks/post-receive -``` - -Whenever such a repository received updates via `git push` craft will be -executed and prints text to the console of the user who pushed the updates. +Log output is redirected to the calling terminal. -- cgit v1.2.3-70-g09d2