Merge branch 'dev' into less_than_64_do_not_calc
This commit is contained in:
34
script/build-api-docs
Executable file
34
script/build-api-docs
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
DOXYGEN_VERSION="1.12.0"
|
||||
DOXYGEN_TAG="Release_${DOXYGEN_VERSION//./_}"
|
||||
|
||||
DOXYGEN_PATH="doxygen"
|
||||
|
||||
download_doxygen() {
|
||||
TEMP_DIR="$(mktemp -d)"
|
||||
trap 'rm -rf "$TEMP_DIR"' EXIT
|
||||
pushd "$TEMP_DIR" >/dev/null
|
||||
echo "downloading doxygen..."
|
||||
curl -o doxygen.tar.gz -L "https://github.com/doxygen/doxygen/releases/download/${DOXYGEN_TAG}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
|
||||
tar -xzf doxygen.tar.gz
|
||||
rm doxygen.tar.gz
|
||||
DOXYGEN_PATH="$TEMP_DIR/doxygen-${DOXYGEN_VERSION}/bin/doxygen"
|
||||
popd >/dev/null
|
||||
echo "doxygen downloaded successfully"
|
||||
}
|
||||
|
||||
# if doxygen command not found or version not as above, download it
|
||||
if command -v doxygen &>/dev/null; then
|
||||
DOXYGEN_VERSION_INSTALLED=$(doxygen --version)
|
||||
if [[ $DOXYGEN_VERSION_INSTALLED != $DOXYGEN_VERSION ]]; then
|
||||
echo "doxygen version $DOXYGEN_VERSION_INSTALLED found, but not the expected version $DOXYGEN_VERSION"
|
||||
download_doxygen
|
||||
else
|
||||
echo "doxygen version $DOXYGEN_VERSION_INSTALLED found, using it"
|
||||
fi
|
||||
else
|
||||
download_doxygen
|
||||
fi
|
||||
|
||||
exec $DOXYGEN_PATH
|
||||
@@ -3,9 +3,6 @@
|
||||
set -e
|
||||
# set -x
|
||||
|
||||
apt update
|
||||
apt-get install avahi-utils -y
|
||||
|
||||
mkdir -p config
|
||||
script/setup
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ def main():
|
||||
print()
|
||||
print("Running pyupgrade...")
|
||||
print()
|
||||
PYUPGRADE_TARGET = "--py39-plus"
|
||||
PYUPGRADE_TARGET = "--py310-plus"
|
||||
for files in filesets:
|
||||
cmd = ["pyupgrade", PYUPGRADE_TARGET] + files
|
||||
log = get_err(*cmd)
|
||||
|
||||
@@ -7,11 +7,7 @@ import sys
|
||||
|
||||
|
||||
def find_and_activate_virtualenv():
|
||||
if (
|
||||
("VIRTUAL_ENV" in os.environ)
|
||||
or os.environ.get("DEVCONTAINER")
|
||||
or os.environ.get("ESPHOME_NO_VENV")
|
||||
):
|
||||
if "VIRTUAL_ENV" in os.environ:
|
||||
return
|
||||
|
||||
try:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
|
||||
if [ ! -n "$VIRTUAL_ENV" ]; then
|
||||
if [ -x "$(command -v uv)" ]; then
|
||||
uv venv venv
|
||||
else
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
@echo off
|
||||
|
||||
if defined DEVCONTAINER goto :install
|
||||
if defined VIRTUAL_ENV goto :install
|
||||
if defined ESPHOME_NO_VENV goto :install
|
||||
|
||||
echo Starting the Virtual Environment
|
||||
python -m venv venv
|
||||
|
||||
Reference in New Issue
Block a user