-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpose-dev-tools-runtime.sh
More file actions
executable file
·36 lines (27 loc) · 1.07 KB
/
expose-dev-tools-runtime.sh
File metadata and controls
executable file
·36 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euo pipefail
source "$(dirname "$0")/dev-tools-runtime-lib.sh"
resolve_dev_tools_runtime
ensure_resolved_runtime_is_available
runtime_directory="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/dev-tools-runtime/bin"
wrapper_path="${runtime_directory}/dev-tools"
mkdir -p "${runtime_directory}"
{
printf '#!/usr/bin/env bash\n'
printf 'set -euo pipefail\n'
printf 'exec %q "$@"\n' "${DEV_TOOLS_RUNTIME_BINARY}"
} > "${wrapper_path}"
chmod +x "${wrapper_path}"
{
printf 'DEV_TOOLS_BINARY=%s\n' "${DEV_TOOLS_RUNTIME_BINARY}"
printf 'DEV_TOOLS_AUTOLOAD=%s\n' "${DEV_TOOLS_RUNTIME_AUTOLOAD}"
printf 'DEV_TOOLS_AUTO_RESOLVE_AUTOLOAD=%s\n' "${DEV_TOOLS_RUNTIME_AUTOLOAD}"
printf 'DEV_TOOLS_RUNTIME_SOURCE=%s\n' "${DEV_TOOLS_RUNTIME_SOURCE}"
} >> "${GITHUB_ENV}"
printf '%s\n' "${runtime_directory}" >> "${GITHUB_PATH}"
{
printf 'binary=%s\n' "${DEV_TOOLS_RUNTIME_BINARY}"
printf 'autoload=%s\n' "${DEV_TOOLS_RUNTIME_AUTOLOAD}"
printf 'source=%s\n' "${DEV_TOOLS_RUNTIME_SOURCE}"
printf 'command=%s\n' "${wrapper_path}"
} >> "${GITHUB_OUTPUT}"