forked from roots/phyllomeos
feat(deploy): generate dishes before deploy and fix dish selection
- deploy.sh now runs 'make all' in cook/ before deploying, since dishes are build products no longer tracked in git; failures show the make output and abort - deploy-distro.sh selects dishes by the *guest-agents* marker (the new naming replaced the virtual* prefix) and uses --os-variant fedora-unknown instead of the stale fedora41 pin
This commit is contained in:
@@ -11,6 +11,12 @@ execute_script() {
|
|||||||
return 0 # Indicate success
|
return 0 # Indicate success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Generate recipes and dishes before deployment (they are build products)
|
||||||
|
if ! (cd cook && make all); then
|
||||||
|
echo "Failed to generate dishes in cook/ (see 'make all' in cook/)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Array of scripts
|
# Array of scripts
|
||||||
scripts=(
|
scripts=(
|
||||||
"./deploy/install-prerequisites-on-linux.sh"
|
"./deploy/install-prerequisites-on-linux.sh"
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ fi
|
|||||||
echo "You selected: $uri"
|
echo "You selected: $uri"
|
||||||
|
|
||||||
# Get a list of files in "dishes" directory
|
# Get a list of files in "dishes" directory
|
||||||
mapfile -t dish_name < <(find "cook/dishes/" -maxdepth 1 -type f \( -name "virtual*" \) -printf "%f\n" | sed 's/\.[^.]*$//')
|
mapfile -t dish_name < <(find "cook/dishes/" -maxdepth 1 -type f \( -name "*guest-agents*" \) -printf "%f\n" | sed 's/\.[^.]*$//')
|
||||||
|
|
||||||
# Check if there are any files
|
# Check if there are any files
|
||||||
if [ ${#dish_name[@]} -eq 0 ]; then
|
if [ ${#dish_name[@]} -eq 0 ]; then
|
||||||
@@ -191,7 +191,7 @@ fi
|
|||||||
# virt-install command with user-defined VM name
|
# virt-install command with user-defined VM name
|
||||||
virt-install \
|
virt-install \
|
||||||
--connect "$uri" \
|
--connect "$uri" \
|
||||||
--os-variant fedora41 \
|
--os-variant fedora-unknown \
|
||||||
--virt-type kvm \
|
--virt-type kvm \
|
||||||
--arch x86_64 \
|
--arch x86_64 \
|
||||||
--machine q35 \
|
--machine q35 \
|
||||||
|
|||||||
Reference in New Issue
Block a user