File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
1313AUTH_DIR=" ${DIR} /../auth"
1414LIB_DIR=" ${DIR} /../../lib"
1515DOCKER_AUTH_DIR=" ${LIB_DIR} /docker/authn"
16- ROOT_DIR=" ${DIR} /../../.."
1716
1817# shellcheck source=../../lib/logging.sh
1918source " ${LIB_DIR} /logging.sh"
@@ -24,15 +23,11 @@ source "${LIB_DIR}/mise.sh"
2423# shellcheck source=../../lib/shell.sh
2524source " ${LIB_DIR} /shell.sh"
2625
27- tool_version () {
28- local tool=" $1 "
29- grep " ^$tool :" " $ROOT_DIR " /versions.yaml | awk ' {print $2}'
30- }
31-
3226info " Ensuring that 'gh' is installed"
3327
34- install_tool_with_mise github-cli " $( tool_version gh) "
35- install_tool_with_mise gojq " $( tool_version gojq) "
28+ ensure_mise_installed
29+ devbase_configure_global_tools
30+ run_mise install --cd " $HOME " github-cli github:getoutreach/ci gojq
3631
3732info " 🔓 Authenticating to GitHub"
3833
Original file line number Diff line number Diff line change @@ -36,9 +36,17 @@ if [[ $OSTYPE == "darwin"* && -z ${ALLOW_MISE_TO_MANAGE_TOOL_VERSIONS:-} ]] || !
3636 install_tool_with_mise node " $( grep ^nodejs " $ROOT_DIR /.tool-versions" | awk ' {print $2}' ) "
3737fi
3838run_mise trust --env devbase --cd " $ROOT_DIR "
39- run_mise install --cd " $HOME " github-cli github:getoutreach/ci gojq
4039
41- bootstrap_github_token
40+ if [[ -z $GITHUB_TOKEN ]]; then
41+ # Minimum amount of tools to install to bootstrap the GitHub token
42+ run_mise install --cd " $HOME " github-cli github:getoutreach/ci gojq
43+
44+ bootstrap_github_token
45+
46+ if [[ -z $GITHUB_TOKEN ]]; then
47+ fatal " GitHub token not configured in environment, needed for installing tools via mise."
48+ fi
49+ fi
4250
4351info " Installing tools via mise required in machine environment"
4452run_mise install --cd " $HOME "
Original file line number Diff line number Diff line change 1- getoutreach/ci : v1.6.14
21getoutreach/logfmt : v1.1.0
32
43# protobuf formatters/plugins/tools/etc
You can’t perform that action at this time.
0 commit comments