Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit block to 2023.12.0 only #41

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions get
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,23 @@ if [ -n "$haPath" ]; then
targetYear=$(echo "${targetVersion}" | cut -d "." -f 1)
currentYear=$(echo "${currentVersion}" | cut -d "." -f 1)

if [ "${currentVersion}" == "2023.12.0" ]; then
rm -R "$haPath/custom_components/hacs"
rm -f "$haPath/custom_components/hacs.zip"
error "HACS will not work on version 2023.12.0 of Home Assistant, upgrade to 2023.12.1 (or newer) before re-running this script."
fi

if [ "${currentYear}" -lt "${targetYear}" ]; then
rm -R "$haPath/custom_components/hacs"
rm -f "$haPath/custom_components/hacs.zip"
error "Version ${currentVersion} is not new enough, needs at least ${targetVersion}"
fi


if [ "${currentYear}" == "${targetYear}" ]; then
targetMonth=$(echo "${targetVersion}" | cut -d "." -f 2)
currentMonth=$(echo "${currentVersion}" | cut -d "." -f 2)

if [ "${currentYear}.${currentMonth}" == "2023.12" ]; then
rm -R "$haPath/custom_components/hacs"
rm -f "$haPath/custom_components/hacs.zip"
error "HACS will currently not work on ${currentYear}.${currentMonth} versions of Home Assistant, latest known working version is 2023.11.3"
fi

if [ "${currentMonth}" -lt "${targetMonth}" ]; then
rm -R "$haPath/custom_components/hacs"
rm -f "$haPath/custom_components/hacs.zip"
Expand Down