Skip to content

Commit edd78bd

Browse files
committed
Updating release script
- Updated venv to use 313 - Install uv on release - Fix problem netifaces for ubuntu 24.04 (UV build error)
1 parent 75bdce6 commit edd78bd

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

common/hiddify_installer.sh

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function install_panel() {
5757

5858

5959

60-
install_package curl libev-dev libevdev2 default-libmysqlclient-dev build-essential git ca-certificates pkg-config jq wireguard pkg-config #needed for installing uv and hiddifypanel
60+
install_package curl libev-dev libevdev2 default-libmysqlclient-dev build-essential git ca-certificates pkg-config jq wireguard pkg-config clang #needed for installing uv and hiddifypanel
6161

6262

6363

@@ -79,6 +79,16 @@ function update_panel() {
7979
local current_panel_version=$(get_installed_panel_version)
8080
# Your existing logic for checking and updating the panel version based on the package mode
8181
# Set panel_update to 1 if an update is performed
82+
83+
# TODO: Temporary workaround for building netifaces==0.11.0 on Ubuntu 24.04.
84+
# The package cannot be built using `uv` due to library management issues.
85+
# As a result, we manually install it via `pip`. This should be resolved by
86+
# updating the build package dependencies, after which these lines can be removed.
87+
# https://github.com/astral-sh/uv/issues/7288
88+
activate_python_venv
89+
uv pip install -U pip
90+
pip install netifaces==0.11
91+
deactivate
8292

8393
case "$package_mode" in
8494
docker)
@@ -150,21 +160,20 @@ function update_panel() {
150160
fi
151161
;;
152162
release)
153-
#TODO release should change to 3.13
154-
install_python310
155163
activate_python_venv
156164
# error "you can not install release version 8 using this script"
157165
# exit 1
158166
latest=$(get_release_version hiddify-panel)
159167
if [[ "$current_panel_version" != "$latest" ]]; then
160-
error "The current beta version is outdated! Updating..."
168+
error "The current release version is outdated! Updating..."
161169
fi
162170
warning "hiddify panel version current=$current_panel_version latest=$latest"
163171
if [[ $force == "true" || "$current_panel_version" != "$latest" ]]; then
164172
update_progress "Updating..." "Hiddify Panel from $current_panel_version to $latest" 10
165173
# pip3 install -U hiddifypanel==$latest
166174
disable_panel_services
167-
pip install -U wheel hiddifypanel
175+
disable_panel_services
176+
uv pip install -U --pre hiddifypanel
168177
update_progress "Updated..." "Hiddify Panel to $latest" 50
169178
return 0
170179
fi
@@ -220,8 +229,6 @@ function update_config() {
220229
fi
221230
;;
222231
release)
223-
# error "you can not install release version 8 using this script"
224-
# exit 1
225232
local latest=$(get_release_version hiddify-manager)
226233
echo "RELEASE: Current Config Version=$current_config_version -- Latest=$latest"
227234
if [[ "$force" == "true" || "$latest" != "$current_config_version" ]]; then
@@ -333,9 +340,9 @@ if [[ " $@ " == *" custom "* ]];then
333340
fi
334341

335342

336-
export USE_VENV=310
337-
if [[ " $@ " == *" dev "* || " $@ " == *" docker "* || " $@ " == *" develop "* || " $@ " == *" beta "* ]];then
338-
export USE_VENV=313
343+
export USE_VENV=313
344+
if [[ " $@ " == v* ]];then
345+
export USE_VENV=310
339346
fi
340347

341348
# Run the main function and log the output

common/utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ function check_venv_compatibility() {
615615
;;
616616
beta)
617617
# Beta is always venv compatible
618-
USE_VENV=310
618+
USE_VENV=313
619619
;;
620620
release)
621621
# Get the latest release version
622-
USE_VENV=310
622+
USE_VENV=313
623623
;;
624624
*)
625625
echo "Unknown package mode: $package_mode"

0 commit comments

Comments
 (0)