Skip to content

Commit e17f7da

Browse files
committed
Merge branch 'dev' into beta
2 parents 585c41d + cfd88bc commit e17f7da

File tree

9 files changed

+24
-23
lines changed

9 files changed

+24
-23
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ ifeq ($(TAG),)
5656
@echo "WARNING: This operation will create s version tag and push to github"
5757
@read -p "Version? (provide the next x.y.z semver) : " TAG
5858
endif
59-
@VERSION_STR=$$(echo $$TAG | grep -Eo '^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}((b|\.dev)[0-9]{1,2})?')
59+
@VERSION_STR=$$(echo $$TAG | grep -Eo '^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}((b)[0-9]{1,2})?')
6060
[ ! -z "$$VERSION_STR" ] || { echo "Incorrect tag. e.g., 1.2.3 or 1.2.3b1"; exit 1; }
61+
@( git checkout beta && git pull && git merge dev ) || ( git checkout dev; echo "error in merging to beta branch"; exit 1 )
6162
@echo "$${TAG}" > VERSION
6263
@make -C ./hiddify-panel/src release TAG=$${TAG}
6364
@git tag $${TAG} > /dev/null
@@ -68,5 +69,6 @@ endif
6869
@echo "creating git tag : v$${TAG}"
6970
@git tag v$${TAG}
7071
@git push -u origin HEAD --tags
72+
@git checkout dev && git merge beta
7173
@echo "Github Actions will detect the new tag and release the new version."
7274

common/hiddify_installer.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function update_config() {
203203
echo "DEVELOP: Current Config Version=$current_config_version -- Latest=$latest"
204204
if [[ "$force" == "true" || "$latest" != "$current_config_version" ]]; then
205205
update_progress "Updating..." "Hiddify Config from $current_config_version to $latest" 60
206-
update_from_github "hiddify-manager.tar.gz" "https://github.com/hiddify/hiddify-manager/archive/refs/heads/main.tar.gz" $latest
206+
update_from_github "hiddify-manager.tar.gz" "https://github.com/hiddify/hiddify-manager/archive/refs/heads/dev.tar.gz" $latest
207207

208208
update_progress "Updated..." "Hiddify Config to $latest" 100
209209
return 0
@@ -256,8 +256,10 @@ function post_update_tasks() {
256256
systemctl kill -s SIGTERM hiddify-panel
257257
fi
258258

259+
if [[ $panel_update == 0 && $config_update != 0 ]]; then
260+
bash /opt/hiddify-manager/apply_configs.sh --no-gui --no-log
261+
fi
259262
systemctl start hiddify-panel
260-
261263
cd /opt/hiddify-manager/hiddify-panel
262264
if [ "$CREATE_EASYSETUP_LINK" == "true" ];then
263265
hiddify-panel-cli set-setting --key create_easysetup_link --val True
@@ -271,10 +273,6 @@ function post_update_tasks() {
271273
hiddify-panel-cli set-setting --key package_mode --val develop
272274
;;
273275
esac
274-
275-
if [[ $panel_update == 0 && $config_update != 0 ]]; then
276-
bash /opt/hiddify-manager/apply_configs.sh --no-gui --no-log
277-
fi
278276
fi
279277
}
280278

common/package_manager.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#!/bin/bash
22
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
33

4-
# echo $SCRIPT_DIR && exit 1
4+
if [[ *develop* != $(realpath $SCRIPT_DIR) ]];then
5+
SCRIPT_DIR="/opt/hiddify-manager/common/"
6+
fi
57

68
source $SCRIPT_DIR/utils.sh
79
# File to store package information
810
PACKAGES_LOCK="$SCRIPT_DIR/packages.lock"
911
CURRENT_PACKAGES="$SCRIPT_DIR/packages.db"
12+
touch $CURRENT_PACKAGES
1013

1114
# Function to calculate file hash
1215
generate_hash() {

hiddify-panel/install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ if [ -n "$HIDDIFY_PANLE_SOURCE_DIR" ]; then
3232
uv pip install -e "$HIDDIFY_PANLE_SOURCE_DIR"
3333
fi
3434

35-
systemctl daemon-reload >/dev/null 2>&1
36-
3735
rm -rf /etc/cron.d/{hiddify_usage_update,hiddify_auto_backup}
3836
# echo "*/1 * * * * root $(pwd)/update_usage.sh" >/etc/cron.d/hiddify_usage_update
3937
# echo "0 */6 * * * hiddify-panel $(pwd)/backup.sh" >/etc/cron.d/hiddify_auto_backup

hiddify-panel/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ if [ -f "../config.env" ]; then
4242
#su hiddify-panel -c "hiddifypanel import-config -c $(pwd)/../config.env"
4343

4444
if [ "$?" == 0 ]; then
45-
rm -f ../config.env
45+
mv ../config.env ../config.env.old
4646
# echo "temporary disable removing config.env"
4747
fi
4848
fi
49+
hiddify-panel-cli init-db
4950

5051
systemctl start hiddify-panel.service
5152
systemctl restart hiddify-panel-background-tasks.service

hiddify-panel/src

Submodule src updated from 8ab750c to c9f219f

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ function main() {
3131
if [ "$DO_NOT_INSTALL" == "true" ];then
3232
PROGRESS_ACTION="Applying..."
3333
fi
34-
if [ "$HIDDIFY_DEBUG" = "1" ]; then
35-
export USE_VENV=313
36-
fi
34+
35+
export USE_VENV=313
36+
3737
install_python
3838
activate_python_venv
3939

other/mysql/install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,8 @@ if ! grep -q "^[^#]*bind-address\s*=\s*127.0.0.1" "$MARIADB_CONF"; then
5959
fi
6060
echo "bind-address set to 127.0.0.1 in $MARIADB_CONF"
6161

62-
# Restart the MariaDB service
63-
if systemctl is-active --quiet mariadb; then
64-
sudo systemctl restart mariadb
65-
echo "MariaDB service restarted"
66-
else
67-
echo "MariaDB service is not running. Please start it manually."
68-
fi
62+
sudo systemctl restart mariadb
63+
6964
fi
7065

7166
systemctl start mariadb

update.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,31 @@ function main() {
4343
echo "Creating a backup ..."
4444
./hiddify-panel/backup.sh
4545

46+
update_script="https://raw.githubusercontent.com/hiddify/Hiddify-Manager/refs/heads/main/common/download.sh"
4647
case "$package_mode" in
4748
develop)
4849
# Use the latest commit from GitHub
4950
latest_panel=$(get_commit_version Hiddify-Panel)
5051
latest_manager=$(get_commit_version hiddify-manager)
52+
update_script="https://raw.githubusercontent.com/hiddify/Hiddify-Manager/refs/heads/dev/common/download.sh"
5153
;;
5254
beta)
5355
latest_panel=$(get_pre_release_version hiddify-panel)
5456
latest_manager=$(get_pre_release_version hiddify-manager)
57+
update_script="https://raw.githubusercontent.com/hiddify/Hiddify-Manager/refs/heads/beta/common/download.sh"
5558
;;
5659
release)
5760
latest_panel=$(get_release_version hiddify-panel)
5861
latest_manager=$(get_release_version hiddify-manager)
62+
update_script="https://raw.githubusercontent.com/hiddify/Hiddify-Manager/refs/heads/main/common/download.sh"
5963
;;
6064
esac
6165

6266
[[ "$latest_panel" != "$current_panel_version" ]] && panel_update=1
6367
[[ "$latest_manager" != "$current_config_version" ]] && manager_update=1
6468
echo "$package_mode Latest panel version: $latest_panel Installed: $current_panel_version Lastest manager version: $latest_manager Installed: $current_config_version"
6569
if [[ "$force" == "true" || $panel_update == 1 || $manager_update == 1 ]]; then
66-
bash <(curl -sSL https://raw.githubusercontent.com/hiddify/hiddify-config/main/common/download.sh) "$package_mode" "$force" "--no-gui" "--no-log"
70+
bash <(curl -sSL $update_script) "$package_mode" "$force" "--no-gui" "--no-log"
6771
else
6872
echo "Nothing to update"
6973
fi

0 commit comments

Comments
 (0)