diff --git a/api_delete/user-delete-api-1.0.0.tar b/api_delete/user-delete-api-1.0.0.tar deleted file mode 100755 index 0e372c9..0000000 Binary files a/api_delete/user-delete-api-1.0.0.tar and /dev/null differ diff --git a/api_gateway/user-gateway-api-1.0.0.tar b/api_gateway/user-gateway-api-1.0.0.tar deleted file mode 100755 index 0f86629..0000000 Binary files a/api_gateway/user-gateway-api-1.0.0.tar and /dev/null differ diff --git a/api_register/user-register-api-1.0.0.tar b/api_register/user-register-api-1.0.0.tar deleted file mode 100755 index 2048068..0000000 Binary files a/api_register/user-register-api-1.0.0.tar and /dev/null differ diff --git a/api_update_account/user-update-account-api-1.0.0.tar b/api_update_account/user-update-account-api-1.0.0.tar deleted file mode 100755 index dd603eb..0000000 Binary files a/api_update_account/user-update-account-api-1.0.0.tar and /dev/null differ diff --git a/api_update_password/user-update-password-api-1.0.0.tar b/api_update_password/user-update-password-api-1.0.0.tar deleted file mode 100755 index 180aeda..0000000 Binary files a/api_update_password/user-update-password-api-1.0.0.tar and /dev/null differ diff --git a/build.py b/build.py index 4ea23fc..3565d64 100644 --- a/build.py +++ b/build.py @@ -103,6 +103,16 @@ def execute_release_scripts(root_dir: str) -> bool: # 复制后确保目标文件可读写 os.chmod(dest_path, 0o644) print(f"已将 {src_path} 替换复制到 {dest_path}") + + # 复制成功后删除原文件 + try: + os.remove(src_path) + print(f"已删除原文件: {src_path}") + except PermissionError: + print(f"警告:无权限删除原文件 {src_path},请手动清理") + except Exception as e: + print(f"删除原文件 {src_path} 时发生错误: {str(e)}") + except PermissionError: print(f"错误:复制 {src_path} 失败(权限不足)") print("建议:使用 sudo 权限重新运行脚本(sudo python3 build.py)") @@ -119,7 +129,6 @@ def execute_release_scripts(root_dir: str) -> bool: def merge_yaml_files(root_dir: str) -> Dict[str, Any]: """合并所有 docker-compose 相关 YAML 文件内容(排除api_template)""" merged = { - 'version': '3.8', 'services': {}, 'networks': {}, 'volumes': {} @@ -158,8 +167,6 @@ def merge_yaml_files(root_dir: str) -> Dict[str, Any]: merged['networks'].update(data['networks']) if 'volumes' in data: merged['volumes'].update(data['volumes']) - if 'version' in data and data['version'] > merged['version']: - merged['version'] = data['version'] except yaml.YAMLError as e: print(f"解析 {file_path} 失败: {e}") @@ -170,26 +177,6 @@ def merge_yaml_files(root_dir: str) -> Dict[str, Any]: return merged -def stop_docker_compose(root_dir: str) -> bool: - """停止docker-compose""" - print("开始停止docker-compose...") - compose_file = os.path.join(root_dir, 'docker-compose.yaml') - if not os.path.exists(compose_file): - print(f"未找到docker-compose文件: {compose_file}") - return False - - return run_shell_command(f"sudo docker-compose -f {compose_file} down", root_dir) - -def start_docker_compose(root_dir: str) -> bool: - """启动docker-compose""" - print("开始启动docker-compose...") - compose_file = os.path.join(root_dir, 'docker-compose.yaml') - if not os.path.exists(compose_file): - print(f"未找到docker-compose文件: {compose_file}") - return False - - return run_shell_command(f"sudo docker-compose -f {compose_file} up -d", root_dir) - def main(): # 先执行清除虚悬镜像操作 print("部署流程开始,先执行清除虚悬镜像操作...") diff --git a/deploy/images/user-delete-api-1.0.0.tar b/deploy/images/user-delete-api-1.0.0.tar index 0e372c9..cefe32f 100644 Binary files a/deploy/images/user-delete-api-1.0.0.tar and b/deploy/images/user-delete-api-1.0.0.tar differ diff --git a/deploy/images/user-gateway-api-1.0.0.tar b/deploy/images/user-gateway-api-1.0.0.tar index 0f86629..ac5878b 100644 Binary files a/deploy/images/user-gateway-api-1.0.0.tar and b/deploy/images/user-gateway-api-1.0.0.tar differ diff --git a/deploy/images/user-login-api-1.0.0.tar b/deploy/images/user-login-api-1.0.0.tar old mode 100755 new mode 100644 index 95ef918..00ff06e Binary files a/deploy/images/user-login-api-1.0.0.tar and b/deploy/images/user-login-api-1.0.0.tar differ diff --git a/deploy/images/user-register-api-1.0.0.tar b/deploy/images/user-register-api-1.0.0.tar index 2048068..92c306f 100644 Binary files a/deploy/images/user-register-api-1.0.0.tar and b/deploy/images/user-register-api-1.0.0.tar differ diff --git a/deploy/images/user-update-account-api-1.0.0.tar b/deploy/images/user-update-account-api-1.0.0.tar index dd603eb..17c8aed 100644 Binary files a/deploy/images/user-update-account-api-1.0.0.tar and b/deploy/images/user-update-account-api-1.0.0.tar differ diff --git a/deploy/images/user-update-password-api-1.0.0.tar b/deploy/images/user-update-password-api-1.0.0.tar index 180aeda..73cd9ca 100644 Binary files a/deploy/images/user-update-password-api-1.0.0.tar and b/deploy/images/user-update-password-api-1.0.0.tar differ diff --git a/docker-compose.yaml b/docker-compose.yaml index 970fad2..d963c70 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,3 @@ -version: '3.8' services: pgadmin: image: dpage/pgadmin4:9.5.0