Skip to content

Commit aa6a052

Browse files
committed
Limit block to 2023.12.0 only
1 parent e877bba commit aa6a052

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

get

+7-6
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,23 @@ if [ -n "$haPath" ]; then
8686
targetYear=$(echo "${targetVersion}" | cut -d "." -f 1)
8787
currentYear=$(echo "${currentVersion}" | cut -d "." -f 1)
8888

89+
if [ "${currentVersion}" == "2023.12.0" ]; then
90+
rm -R "$haPath/custom_components/hacs"
91+
rm -f "$haPath/custom_components/hacs.zip"
92+
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."
93+
fi
94+
8995
if [ "${currentYear}" -lt "${targetYear}" ]; then
9096
rm -R "$haPath/custom_components/hacs"
9197
rm -f "$haPath/custom_components/hacs.zip"
9298
error "Version ${currentVersion} is not new enough, needs at least ${targetVersion}"
9399
fi
94100

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

99-
if [ "${currentYear}.${currentMonth}" == "2023.12" ]; then
100-
rm -R "$haPath/custom_components/hacs"
101-
rm -f "$haPath/custom_components/hacs.zip"
102-
error "HACS will currently not work on ${currentYear}.${currentMonth} versions of Home Assistant, latest known working version is 2023.11.3"
103-
fi
104-
105106
if [ "${currentMonth}" -lt "${targetMonth}" ]; then
106107
rm -R "$haPath/custom_components/hacs"
107108
rm -f "$haPath/custom_components/hacs.zip"

0 commit comments

Comments
 (0)