Skip to content

Commit 7d20db7

Browse files
ejsearsjimmyjon711
andauthored
Remove moonraker tracking for updates (#451)
Removes the version checking and version management functionality from the AFC installer scripts. --------- Co-authored-by: jimmyjon711 <jcmadill1@gmail.com>
1 parent 0bcdee9 commit 7d20db7

8 files changed

Lines changed: 21 additions & 81 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [2025-06-16]
9+
### Removed
10+
- Removed the version checking functionality for force updates from the `install-afc.sh` script.
11+
912
### Fixed
1013
- Issue where espoolers would move way faster than normal when weight was below empty spool weight.
1114

include/constants.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ branch="main"
3030
prior_installation="False"
3131
installation_type="BoxTurtle (4-Lane)"
3232
uninstall="False"
33-
force_update="True"
3433
backup_date=$(date +%Y%m%d%H%M%S)
35-
current_install_version="1.0.0"
36-
min_version="1.0.0"
3734
files_updated_or_installed="False"
3835
test_mode="False"
3936
installation_options=("BoxTurtle (4-Lane)" "BoxTurtle (8-Lane)" "NightOwl" "HTLF" "QuattroBox")

include/install_functions.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ install_afc() {
166166

167167
export message
168168
export files_updated_or_installed="True"
169-
if [ "$test_mode" != "True" ]; then
170-
update_afc_version "$current_install_version"
171-
fi
169+
172170
# Final step should be displaying any messages and exit cleanly.
173171
message="""
174172
- AFC Configuration updated with selected options at ${afc_file}

include/menus/install_menu.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,7 @@ fi
220220
cycle_array qb_board_types board_counter qb_board_type "QuattroBox Board Type" ;;
221221
F)
222222
cycle_array qb_motor_types motor qb_motor_type "QuattroBox Motor Type" ;;
223-
I)
224-
if [ "$force_update" == "True" ] && [ "$prior_installation" == "True" ]; then
225-
backup_afc_config
226-
fi
227-
install_afc ;;
223+
I) install_afc ;;
228224
M) main_menu ;;
229225
Q) exit_afc_install ;;
230226
*) echo "Invalid selection" ;;

include/menus/main_menu.sh

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ main_menu() {
2727
elif [ "$prior_installation" == "False" ]; then
2828
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Prior AFC-Klipper-Add-On installation detected: $RED%s$RESET\n" $prior_installation
2929
fi
30-
if [ "$force_update" == "True" ] && [ "$prior_installation" == "True" ]; then
31-
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Force Update Required: $RED%s$RESET\n" $force_update
32-
export message="""
33-
${RED}Due to significant configuration changes, your system must be updated. This will require
34-
the complete installation/re-installation of your configuration files. Your existing
35-
configuration (if present) will be backed up and new configuration files will be written.
36-
37-
If you do not want to proceed, please exit the script. However, until this process is
38-
completed you will not be able to use this assisted process for any future updates.
39-
"""
40-
else
41-
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Force Update Required: $GREEN%s$RESET\n" $force_update
42-
fi
4330
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m \n"
4431
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m \n"
4532
printf "\e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m 1. Printer Config Directory : %s \n" $printer_config_dir
@@ -59,12 +46,10 @@ completed you will not be able to use this assisted process for any future updat
5946
printf "█%b Type a number or letter and press Enter/Return to toggle choice%b █\n" "$RESET" "$MENU_GREEN"
6047
printf "${MENU_GREEN}▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀${RESET} \n"
6148
echo ""
62-
if [ "$force_update" == "True" ] && [ "$prior_installation" == "True" ]; then
63-
printf "I. Install New System\n"
64-
elif [ "$prior_installation" == "False" ] && [ "$files_updated_or_installed" == "False" ]; then
49+
if [ "$prior_installation" == "False" ] && [ "$files_updated_or_installed" == "False" ]; then
6550
printf "I. Install New System\n"
6651
fi
67-
if [ "$prior_installation" == "True" ] && [ "$force_update" == "False" ]; then
52+
if [ "$prior_installation" == "True" ]; then
6853
printf "U. Update AFC Klipper Add-On\n"
6954
fi
7055
printf "A. Install Additional System\n"
@@ -76,33 +61,20 @@ completed you will not be able to use this assisted process for any future updat
7661

7762
choice="${choice^^}"
7863
case $choice in
79-
1)
80-
export message="To change the printer config directory, please re-run this script with a '-m <path>' option." ;;
81-
2)
82-
export message="To change the klipper directory, please re-run this script with a '-k <path>' option." ;;
83-
3)
84-
export message="To change the moonraker config file, please re-run this script with a '-m <path>' option." ;;
85-
4)
86-
export message="To change the klipper service name, please re-run this script with a '-s <name>' option." ;;
87-
5)
88-
export message="To change the branch, please re-run this script with a '-b <branch>' option." ;;
89-
6)
90-
export message="To change the moonraker address, please re-run this script with a '-a <address>' option.\n"
91-
export message+="To change the moonraker port, please re-run this script with a '-n <moonraker port>' option." ;;
92-
I)
93-
install_menu ;;
94-
U)
95-
update_menu ;;
96-
R)
97-
uninstall_afc ;;
98-
C)
99-
utilities_menu ;;
100-
A)
101-
additional_system_menu ;;
102-
Q)
103-
exit_afc_install ;;
104-
*)
105-
echo "Invalid choice" ;;
64+
1) export message="To change the printer config directory, please re-run this script with a '-m <path>' option." ;;
65+
2) export message="To change the klipper directory, please re-run this script with a '-k <path>' option." ;;
66+
3) export message="To change the moonraker config file, please re-run this script with a '-m <path>' option." ;;
67+
4) export message="To change the klipper service name, please re-run this script with a '-s <name>' option." ;;
68+
5) export message="To change the branch, please re-run this script with a '-b <branch>' option." ;;
69+
6) export message="To change the moonraker address, please re-run this script with a '-a <address>' option.\n"
70+
message+="To change the moonraker port, please re-run this script with a '-n <moonraker port>' option." ;;
71+
I) install_menu ;;
72+
U) update_menu ;;
73+
R) uninstall_afc ;;
74+
C) utilities_menu ;;
75+
A) additional_system_menu ;;
76+
Q) exit_afc_install ;;
77+
*) echo "Invalid choice" ;;
10678
esac
10779
done
10880
}

include/uninstall.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ uninstall_afc() {
99
unlink_extensions
1010
manage_include "${printer_config_dir}/printer.cfg" "remove"
1111
backup_afc_config
12-
remove_afc_version
1312
restart_klipper
1413
message="""
1514
AFC has been uninstalled successfully.

include/utils.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ restart_klipper() {
139139

140140
exit_afc_install() {
141141
if [ "$files_updated_or_installed" == "True" ]; then
142-
update_afc_version "$current_install_version"
143142
restart_klipper
144143
fi
145144
remove_vars_tool_file
@@ -154,25 +153,6 @@ function auto_update() {
154153
# mv "${AFC_CONFIG_PATH}/AFC_Hardware-temp.cfg" "${AFC_CONFIG_PATH}/AFC_Hardware.cfg"
155154
}
156155

157-
check_version_and_set_force_update() {
158-
local current_version
159-
current_version=$(curl -s "$moonraker/server/database/item?namespace=afc-install&key=version" | jq -r .result.value)
160-
if [[ -z "$current_version" || "$current_version" == "null" || "$current_version" < "$min_version" ]]; then
161-
force_update=True
162-
else
163-
force_update=False
164-
fi
165-
}
166-
167-
update_afc_version() {
168-
local version_update
169-
version_update=$1
170-
curl -s -XPOST "$moonraker/server/database/item?namespace=afc-install&key=version&value=$version_update" > /dev/null
171-
}
172-
173-
remove_afc_version() {
174-
curl -s -XDELETE "$moonraker/server/database/item?namespace=afc-install&key=version" > /dev/null
175-
}
176156

177157
remove_vars_tool_file() {
178158
if [ -f "${afc_config_dir}/*.tool" ]; then

install-afc.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ main() {
7373
clone_and_maybe_restart
7474
fi
7575
check_existing_install
76-
check_version_and_set_force_update
77-
#set_install_version_if_missing
78-
if [ "$force_update_no_version" == "False" ]; then
79-
check_version_and_set_force_update
80-
fi
8176
echo "Starting installation process.."
8277
sleep 2
8378
clear

0 commit comments

Comments
 (0)