-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1049 from redpanda-data/sj/homegeneous-redpanda-t…
…ooling chore: improve tooling for using task
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v3.34.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" "$@" |