mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 22:50:32 +00:00
Set PROTOC environment variable when installing protoc
This commit is contained in:
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Set the `PROTOC` environment variable when installing `protoc` if it has not already been set.
|
||||||
|
|
||||||
## [1.9.0] - 2022-08-01
|
## [1.9.0] - 2022-08-01
|
||||||
|
|
||||||
- Support `protoc`.
|
- Support `protoc`.
|
||||||
|
|||||||
8
main.sh
8
main.sh
@@ -239,6 +239,14 @@ for tool in "${tools[@]}"; do
|
|||||||
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||||
esac
|
esac
|
||||||
download "${url}" /usr/local/bin "bin/protoc${exe}"
|
download "${url}" /usr/local/bin "bin/protoc${exe}"
|
||||||
|
if [[ -z "${PROTOC:-}" ]]; then
|
||||||
|
info "setting PROTOC environment variable"
|
||||||
|
if [[ -d /usr/local/bin ]]; then
|
||||||
|
echo "PROTOC=/usr/local/bin/protoc${exe}" >>"${GITHUB_ENV}"
|
||||||
|
else
|
||||||
|
echo "PROTOC=${HOME}/.install-action/bin/protoc${exe}" >>"${GITHUB_ENV}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
shellcheck)
|
shellcheck)
|
||||||
# https://github.com/koalaman/shellcheck/releases
|
# https://github.com/koalaman/shellcheck/releases
|
||||||
|
|||||||
Reference in New Issue
Block a user