mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 06:58:11 +01:00
Allow loading esphome version from a fork (#907)
This commit is contained in:
parent
8a08d1fb5d
commit
d280380c8d
1 changed files with 9 additions and 1 deletions
|
@ -8,7 +8,15 @@ declare esphome_version
|
||||||
|
|
||||||
if bashio::config.has_value 'esphome_version'; then
|
if bashio::config.has_value 'esphome_version'; then
|
||||||
esphome_version=$(bashio::config 'esphome_version')
|
esphome_version=$(bashio::config 'esphome_version')
|
||||||
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
if [[ $esphome_version == *":"* ]]; then
|
||||||
|
IFS=':' read -r -a array <<< "$esphome_version"
|
||||||
|
username=${array[0]}
|
||||||
|
ref=${array[1]}
|
||||||
|
else
|
||||||
|
username="esphome"
|
||||||
|
ref=$esphome_version
|
||||||
|
fi
|
||||||
|
full_url="https://github.com/${username}/esphome/archive/${ref}.zip"
|
||||||
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
||||||
pip3 install -U --no-cache-dir "${full_url}" \
|
pip3 install -U --no-cache-dir "${full_url}" \
|
||||||
|| bashio::exit.nok "Failed installing esphome pinned version."
|
|| bashio::exit.nok "Failed installing esphome pinned version."
|
||||||
|
|
Loading…
Reference in a new issue