From 814fef4185d23e45e37749cf5864f951f370e88c Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 13 Sep 2024 13:15:06 +0200 Subject: [PATCH] fix alias usage in git-pull-and-run-if-origin-changed --- ...ed => git-pull-and-if-origin-changed-run-tests} | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) rename bin/{git-pull-and-run-if-origin-changed => git-pull-and-if-origin-changed-run-tests} (79%) diff --git a/bin/git-pull-and-run-if-origin-changed b/bin/git-pull-and-if-origin-changed-run-tests similarity index 79% rename from bin/git-pull-and-run-if-origin-changed rename to bin/git-pull-and-if-origin-changed-run-tests index fa34e06a..945c4dbd 100755 --- a/bin/git-pull-and-run-if-origin-changed +++ b/bin/git-pull-and-if-origin-changed-run-tests @@ -1,13 +1,5 @@ #!/bin/bash -if [ -z "$1" ]; then - echo "command missing in arguments" >&2 - exit 1 -fi - -shopt -s expand_aliases -source .aliases - # get the current branch name BRANCH=$(git rev-parse --abbrev-ref HEAD) @@ -24,8 +16,10 @@ while true; do git pull origin $BRANCH # run the command - echo "Running $*" - "$@" + echo "Running gw-test" + shopt -s expand_aliases + source .aliases + gw-test else echo "no changes detected on the origin branch" fi