Skip to content

Commit

Permalink
Support .bat hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-johnson committed Jul 25, 2019
1 parent a4a85e0 commit 633eb69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .buildkite/local-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ steps:
plugins:
- ./.buildkite/plugins/metahook:
pre-command: |
echo "pre-command hook"
echo "pre-command hook"
echo "with two commands"
command: echo "command hook"
command.bat: echo "command hook"
post-command: echo "post-command hook"
pre-exit: echo "pre-exit hook"
2 changes: 2 additions & 0 deletions python/setup-hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"pre-exit",
]

hooks += ['%s.bat' % hook for hook in hooks]

def cleanup_metahooks():
"""Remove the temporary hooks"""
hooks = [os.path.join(HOOKDIR, hook) for hook in os.listdir(HOOKDIR) if hook != 'environment']
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ common: &common
plugins:
- ca-johnson/metahook:
post-checkout: scripts/setup.sh
pre-exit: scripts/cleanup.sh
post-checkout.bat: scripts/windows-setup.bat
pre-exit: |
scripts/cleanup.sh
echo "Step finished!"
scripts/notify.sh
steps:
- label: "Build"
Expand Down

0 comments on commit 633eb69

Please sign in to comment.