Skip to content

Commit

Permalink
Merge pull request #1049 from redpanda-data/sj/homegeneous-redpanda-t…
Browse files Browse the repository at this point in the history
…ooling

chore: improve tooling for using task
  • Loading branch information
sago2k8 authored Jan 30, 2024
2 parents 57a927c + a9070e8 commit 6630a54
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .taskversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v3.34.1
24 changes: 24 additions & 0 deletions taskw
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -eu

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";

test -f "${SCRIPT_DIR}/.taskversion"

VERSION=$(cat "${SCRIPT_DIR}/.taskversion")
TASK_DIR="${SCRIPT_DIR}/build/bin"
TASK="${TASK_DIR}/task"

mkdir -p "$TASK_DIR"

if [[ ! -x $TASK ]] || [[ $($TASK --version | awk '{print $3}') != "${VERSION}" ]]; then
echo "--- updating task to ${VERSION}"
sh -c "$(curl --retry 5 --retry-delay 0 --retry-max-time 60 --location https://raw.githubusercontent.com/go-task/task/${VERSION}/docs/static/install.sh)" -- -d -b "${TASK_DIR}" "${VERSION}"
fi

if ! command -v realpath &>/dev/null; then
echo "--- realpath command not found. Please install 'coreutils' package for your OS to continue. Exiting"
exit 1
fi

$TASK -d "$SCRIPT_DIR" "$@"

0 comments on commit 6630a54

Please sign in to comment.