From 633eb69e4a48e18bf381490e39358d1f336a3975 Mon Sep 17 00:00:00 2001 From: Carl Johnson Date: Thu, 25 Jul 2019 09:03:41 -0600 Subject: [PATCH] Support .bat hooks --- .buildkite/local-pipeline.yml | 4 ++-- python/setup-hooks.py | 2 ++ readme.md | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.buildkite/local-pipeline.yml b/.buildkite/local-pipeline.yml index a82e599..a6e986d 100644 --- a/.buildkite/local-pipeline.yml +++ b/.buildkite/local-pipeline.yml @@ -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" \ No newline at end of file diff --git a/python/setup-hooks.py b/python/setup-hooks.py index 7ff2732..b904f1c 100644 --- a/python/setup-hooks.py +++ b/python/setup-hooks.py @@ -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'] diff --git a/readme.md b/readme.md index 610a0fc..2259062 100644 --- a/readme.md +++ b/readme.md @@ -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"