Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
Reverted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-scott committed Nov 11, 2023
1 parent 87eba2a commit 2e42e9f
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions bin/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,19 @@ SRC_DIR="${START_DIR}/core/homeassistant/components/default_config"
# Check the source directory exists
test -d "${SRC_DIR}" || exit 1

# # Clean out the old data if it exists.
# if [[ -d custom_components ]]; then
# rm -rf custom_components
# fi

# Create somewhere for our updated code to go.
if [[ ! -d custom_components/default_config ]]; then
mkdir -p custom_components/default_config
fi

# Copy over the upstream files
if rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" --dry-run | grep -q default_config; then

rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components"
rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components"

# Add in required data for the component to get loaded
cat <<<$(jq ". + { "version": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\" }" ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json
# Add in required data for the component to get loaded
cat <<<$(jq ". + { "version": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\" }" ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json

# Disable the 'cloud' integration.
cat <<<$(jq 'del(.dependencies[] | select(. == "cloud"))' ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json
# Disable the 'cloud' integration.
cat <<<$(jq 'del(.dependencies[] | select(. == "cloud"))' ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json

# Update hacs.json with the minimum homeassistant value for the latest release
cat <<<$(jq ".homeassistant = \"${HOME_ASSISTANT_CORE_LATEST_TAG}\"" ${START_DIR}/hacs.json) >${START_DIR}/hacs.json

fi
# Update hacs.json with the minimum homeassistant value for the latest release
cat <<<$(jq ".homeassistant = \"${HOME_ASSISTANT_CORE_LATEST_TAG}\"" ${START_DIR}/hacs.json) >${START_DIR}/hacs.json

0 comments on commit 2e42e9f

Please sign in to comment.