Age | Commit message (Collapse) | Author |
|
|
|
While the exit log message is prefixed with `defer` and thus called at
the end of the main function it is in theory possible that the startup
log message fails. This would result in a exit message without startup
message which is confusing.
Furthermore it is not intuitive while reading the code to see the exit
message first.
|
|
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.
|
|
craft.sh is the script which needs to be located inside the repository
root to define how the repository should be used.
The first defined function is `build()` which is used to build the
repository content.
|
|
This commit add the usage of shallow submodule updates. Thus after
checking out the targeted commit of the parent repository only the
required commits of the submodules are fetched.
|
|
This adds support for repositories having submodules. Nevertheless all
the required clone operations are complete which makes this process time
consuming depending on the list of submodules.
|
|
After detecting an update of a Git ref craft should create a throw-away
Git clone of the repository with the new Git commit checked out. This is
the starting point for executing build and test steps.
Improving performance by tree-less or shallow clones and updating
submodules is not yet implemented.
|
|
- exit message
- more consistent messages
- refactoring to implement this
|
|
Since craft should only be referenced by a symlink like that:
ln -s /usr/bin/craft myrepo/.git/hooks/post-receive
It is important to detect the hook type, in this case 'post-receive'.
This commit also validates that the determined hook type is supported.
Currently only the post-receive hook is supported.
|
|
When craft is used - as intended - as Git post-receive hook the current
working directory should always be the .git folder. In case of bare
repositories this should point to the bare repository.
|
|
The first program for this repsoitory will be a Git post-receive hook
which will be used at any source repository which is registered for
automated builds.
|