scripts: Install uv dep required during setup (#364)

This commit is contained in:
Riccardo Schirone
2025-09-29 16:52:41 +02:00
committed by GitHub
parent 2987140d69
commit 9302f5dd36
3 changed files with 108 additions and 45 deletions
+75
View File
@@ -78,6 +78,18 @@ install_docker() {
print_success "Docker buildx plugin installed"
}
install_uv() {
print_status "Installing uv..."
if ! command_exists uv; then
curl -fsSL https://astral.sh/uv/install.sh | sh
print_status "Sourcing uv environment..."
source $HOME/.local/bin/env
print_success "uv installed successfully"
else
print_success "uv is already installed"
fi
}
# Function to install kubectl
install_kubectl() {
print_status "Installing kubectl..."
@@ -754,3 +766,66 @@ check_aks_config() {
return $errors
fi
}
# Function to check if Homebrew exists
check_brew() {
if ! command_exists brew; then
print_error "Homebrew (brew) is not installed!"
print_error "Please install Homebrew first: https://brew.sh/"
exit 1
fi
}
install_docker_mac() {
if command_exists docker; then
print_success "Docker is already installed"
else
print_status "Installing Docker..."
brew install --cask docker
fi
}
install_uv_mac() {
if command_exists uv; then
print_success "uv is already installed"
else
print_status "Installing uv..."
brew install uv
fi
}
install_helm_mac() {
if command_exists helm; then
print_success "Helm is already installed"
else
print_status "Installing Helm..."
brew install helm
fi
}
install_kubectl_mac() {
if command_exists kubectl; then
print_success "kubectl is already installed"
else
print_status "Installing kubectl..."
brew install kubectl
fi
}
install_minikube_mac() {
if command_exists minikube; then
print_success "Minikube is already installed"
else
print_status "Installing Minikube..."
brew install minikube
fi
}
install_git_lfs_mac() {
if command_exists git-lfs; then
print_success "Git LFS is already installed"
else
print_status "Installing Git LFS..."
brew install git-lfs
fi
}
+31
View File
@@ -315,9 +315,40 @@ deployment_instructions() {
echo " - Cleanup: make clean"
}
install_linux() {
install_kubectl
install_helm
install_uv
}
install_macos() {
check_brew
install_kubectl_mac
install_helm_mac
install_uv_mac
}
# Main execution
main() {
print_status "Starting production setup..."
# Detect operating system and install dependencies
OS="$(uname -s)"
case "$OS" in
Linux*)
print_status "Detected Linux - installing Linux dependencies..."
install_linux
;;
Darwin*)
print_status "Detected macOS - installing macOS dependencies..."
install_macos
;;
*)
print_error "Unsupported operating system: $OS"
print_error "This script supports Linux and macOS only."
exit 1
;;
esac
check_azure_cli
check_terraform
+2 -45
View File
@@ -59,51 +59,7 @@ install_linux() {
install_helm
install_minikube
install_git_lfs
}
# Function to check if Homebrew exists
check_brew() {
if ! command_exists brew; then
print_error "Homebrew (brew) is not installed!"
print_error "Please install Homebrew first: https://brew.sh/"
exit 1
fi
}
install_docker_mac() {
if command_exists docker; then
print_success "Docker is already installed"
else
print_status "Installing Docker..."
brew install --cask docker
fi
}
install_helm_mac() {
if command_exists helm; then
print_success "Helm is already installed"
else
print_status "Installing Helm..."
brew install helm
fi
}
install_minikube_mac() {
if command_exists minikube; then
print_success "Minikube is already installed"
else
print_status "Installing Minikube..."
brew install minikube
fi
}
install_git_lfs_mac() {
if command_exists git-lfs; then
print_success "Git LFS is already installed"
else
print_status "Installing Git LFS..."
brew install git-lfs
fi
install_uv
}
install_macos() {
@@ -112,6 +68,7 @@ install_macos() {
install_helm_mac
install_minikube_mac
install_git_lfs_mac
install_uv_mac
}
# Main execution