Fix: try to fix the non working sync
This commit is contained in:
@@ -51,7 +51,7 @@ while [[ $# -gt 0 ]]; do
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --platforms <list> Comma-separated: macos-arm64,macos-x86_64,linux-x86_64,linux-aarch64,windows-x86_64"
|
||||
echo " --targets <list> Comma-separated: cli,desktop,plugins"
|
||||
echo " --targets <list> Comma-separated: cli,desktop,plugins,installer"
|
||||
echo " --all Build all platforms and targets"
|
||||
echo " --yes Skip confirmation prompt"
|
||||
echo ""
|
||||
@@ -105,22 +105,30 @@ prompt_platforms() {
|
||||
}
|
||||
|
||||
prompt_targets() {
|
||||
local show_installer=false
|
||||
for p in "${selected_platforms[@]}"; do
|
||||
[[ "$p" == *windows* ]] && show_installer=true
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Select targets (0=all, comma-separated):"
|
||||
echo " 0) All"
|
||||
echo " 1) cagire"
|
||||
echo " 2) cagire-desktop"
|
||||
echo " 3) cagire-plugins (CLAP/VST3)"
|
||||
$show_installer && echo " 4) installer (NSIS, implies cli+desktop+plugins)"
|
||||
read -rp "> " choice
|
||||
|
||||
build_cagire=false
|
||||
build_desktop=false
|
||||
build_plugins=false
|
||||
build_installer=false
|
||||
|
||||
if [[ "$choice" == "0" || -z "$choice" ]]; then
|
||||
build_cagire=true
|
||||
build_desktop=true
|
||||
build_plugins=true
|
||||
$show_installer && build_installer=true
|
||||
else
|
||||
IFS=',' read -ra targets <<< "$choice"
|
||||
for t in "${targets[@]}"; do
|
||||
@@ -129,10 +137,24 @@ prompt_targets() {
|
||||
1) build_cagire=true ;;
|
||||
2) build_desktop=true ;;
|
||||
3) build_plugins=true ;;
|
||||
4)
|
||||
if $show_installer; then
|
||||
build_installer=true
|
||||
else
|
||||
echo "Invalid target: $t"; exit 1
|
||||
fi
|
||||
;;
|
||||
*) echo "Invalid target: $t"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# Installer requires cli+desktop+plugins
|
||||
if $build_installer; then
|
||||
build_cagire=true
|
||||
build_desktop=true
|
||||
build_plugins=true
|
||||
fi
|
||||
}
|
||||
|
||||
confirm_summary() {
|
||||
@@ -147,7 +169,8 @@ confirm_summary() {
|
||||
echo "Targets:"
|
||||
$build_cagire && echo " - cagire"
|
||||
$build_desktop && echo " - cagire-desktop"
|
||||
$build_plugins && echo " - cagire-plugins (CLAP/VST3)"
|
||||
$build_plugins && echo " - cagire-plugins (CLAP/VST3)"
|
||||
$build_installer && echo " - installer (NSIS)"
|
||||
echo ""
|
||||
read -rp "Proceed? [Y/n] " yn
|
||||
case "${yn,,}" in
|
||||
@@ -328,7 +351,7 @@ copy_artifacts() {
|
||||
fi
|
||||
|
||||
# NSIS installer for Windows targets
|
||||
if [[ "$os" == "windows" ]] && command -v makensis &>/dev/null; then
|
||||
if $build_installer && [[ "$os" == "windows" ]] && command -v makensis &>/dev/null; then
|
||||
echo " Building NSIS installer..."
|
||||
local version
|
||||
version=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
|
||||
@@ -384,6 +407,7 @@ if $cli_all; then
|
||||
build_cagire=true
|
||||
build_desktop=true
|
||||
build_plugins=true
|
||||
build_installer=true
|
||||
elif [[ -n "$cli_platforms" || -n "$cli_targets" ]]; then
|
||||
# Resolve platforms from CLI
|
||||
if [[ -n "$cli_platforms" ]]; then
|
||||
@@ -405,21 +429,31 @@ elif [[ -n "$cli_platforms" || -n "$cli_targets" ]]; then
|
||||
build_cagire=false
|
||||
build_desktop=false
|
||||
build_plugins=false
|
||||
build_installer=false
|
||||
if [[ -n "$cli_targets" ]]; then
|
||||
IFS=',' read -ra tgts <<< "$cli_targets"
|
||||
for t in "${tgts[@]}"; do
|
||||
t="${t// /}"
|
||||
case "$t" in
|
||||
cli) build_cagire=true ;;
|
||||
desktop) build_desktop=true ;;
|
||||
plugins) build_plugins=true ;;
|
||||
*) echo "Unknown target: $t (expected: cli, desktop, plugins)"; exit 1 ;;
|
||||
cli) build_cagire=true ;;
|
||||
desktop) build_desktop=true ;;
|
||||
plugins) build_plugins=true ;;
|
||||
installer) build_installer=true ;;
|
||||
*) echo "Unknown target: $t (expected: cli, desktop, plugins, installer)"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
build_cagire=true
|
||||
build_desktop=true
|
||||
build_plugins=true
|
||||
build_installer=true
|
||||
fi
|
||||
|
||||
# Installer requires cli+desktop+plugins
|
||||
if $build_installer; then
|
||||
build_cagire=true
|
||||
build_desktop=true
|
||||
build_plugins=true
|
||||
fi
|
||||
else
|
||||
prompt_platforms
|
||||
|
||||
Reference in New Issue
Block a user