fix(install.sh): remove references to deleted 2.0.0 versions and install all FlowHelpers
Build / Lint & Test (push) Successful in 15s
Build / Lint & Test (push) Successful in 15s
This commit is contained in:
1 parent
30fb556af7
commit
a05b84f046
1 file changed
+24
-21
+24
-21
@@ -75,14 +75,6 @@ download_plugin() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local versions="1.0.0"
|
local versions="1.0.0"
|
||||||
if [[ "$VERSION_MODE" == "all" ]]; then
|
|
||||||
case "$name" in
|
|
||||||
copyToWorkDir) versions="1.0.0 2.0.0" ;;
|
|
||||||
replaceOriginalFile) versions="1.0.0 2.0.0" ;;
|
|
||||||
esac
|
|
||||||
elif [[ "$name" == "copyToWorkDir" || "$name" == "replaceOriginalFile" ]]; then
|
|
||||||
versions="2.0.0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for version in $versions; do
|
for version in $versions; do
|
||||||
local dest="${PLUGIN_DIR}/LocalFlowPlugins/${category}/${name}/${version}"
|
local dest="${PLUGIN_DIR}/LocalFlowPlugins/${category}/${name}/${version}"
|
||||||
@@ -98,16 +90,29 @@ download_plugin() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
download_progress_helper() {
|
download_flow_helpers() {
|
||||||
local dest="${PLUGIN_DIR}/FlowHelpers/1.0.0"
|
local dest="${PLUGIN_DIR}/FlowHelpers/1.0.0"
|
||||||
local url="${RAW}/FlowHelpers/1.0.0/copyWithProgress.js"
|
local helpers=("copyWithProgress.js" "cliUtils.js" "fileUtils.js")
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
if curl -fsSL "$url" -o "${dest}/copyWithProgress.js"; then
|
for helper in "${helpers[@]}"; do
|
||||||
echo " ✓ copyWithProgress helper → ${dest}/copyWithProgress.js"
|
local url="${RAW}/FlowHelpers/1.0.0/${helper}"
|
||||||
else
|
if curl -fsSL "$url" -o "${dest}/${helper}"; then
|
||||||
echo " ✗ Failed to download copyWithProgress helper from ${url}"
|
echo " ✓ FlowHelper ${helper} → ${dest}/${helper}"
|
||||||
return 1
|
else
|
||||||
fi
|
echo " ✗ Failed to download ${helper} from ${url}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_deprecated_plugins() {
|
||||||
|
for deprecated in copyToWorkDir replaceOriginalFile; do
|
||||||
|
local dep_dir="${PLUGIN_DIR}/LocalFlowPlugins/utility/${deprecated}/2.0.0"
|
||||||
|
if [[ -d "$dep_dir" ]]; then
|
||||||
|
rm -rf "$dep_dir"
|
||||||
|
echo " 🗑️ Removed deprecated ${deprecated} 2.0.0"
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# ── Run ───────────────────────────────────────────────────────────────────────
|
# ── Run ───────────────────────────────────────────────────────────────────────
|
||||||
@@ -117,15 +122,13 @@ echo " Target : ${PLUGIN_DIR}"
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
ERRORS=0
|
ERRORS=0
|
||||||
|
clean_deprecated_plugins
|
||||||
|
|
||||||
for plugin in "${TARGETS[@]}"; do
|
for plugin in "${TARGETS[@]}"; do
|
||||||
download_plugin "$plugin" || ERRORS=$((ERRORS + 1))
|
download_plugin "$plugin" || ERRORS=$((ERRORS + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$VERSION_MODE" == "all"
|
download_flow_helpers || ERRORS=$((ERRORS + 1))
|
||||||
|| " ${TARGETS[*]} " == *" copyToWorkDir "*
|
|
||||||
|| " ${TARGETS[*]} " == *" replaceOriginalFile "* ]]; then
|
|
||||||
download_progress_helper || ERRORS=$((ERRORS + 1))
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [[ $ERRORS -eq 0 ]]; then
|
if [[ $ERRORS -eq 0 ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user