Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
af28854
fix(compose): add checks for existing containers and networks before …
mstrhakr Apr 3, 2026
5f6964d
feat(sortable): implement sortable stacks with lock functionality and…
mstrhakr Apr 9, 2026
b567e84
fix(sortable): extract js to own file
mstrhakr Apr 9, 2026
50e52ae
feat(sortable): load sortable functions from external composeSortable.js
mstrhakr Apr 9, 2026
792e023
fix(sortable): update LockButton assignment to prevent hoisting issues
mstrhakr Apr 9, 2026
78387ad
feat(sortable): update mover icon style to enhance visibility in stac…
mstrhakr Apr 9, 2026
96a3ffa
Merge pull request #87 from mstrhakr:feat/sortable-stacks
mstrhakr Apr 9, 2026
b6feb23
refactor(structure): rename php/->include/, styles/->sheets/, PascalC…
mstrhakr Mar 30, 2026
72b6072
refactor(structure): update all path references for include/ and sheets/
mstrhakr Mar 30, 2026
c8885cf
refactor(tests): update utilPath in StackInfoSourceTest to reflect fo…
mstrhakr Apr 9, 2026
3a2f2eb
fix(tests): correct casing in test descriptions for ComposeListHtmlTe…
mstrhakr Apr 9, 2026
d554ed9
Merge pull request #76 from mstrhakr:fix/refactor-folder-structure
mstrhakr Apr 9, 2026
ec7c834
feat(sortable): add normalizeComposeDetailsRowOrder function to reord…
mstrhakr Apr 9, 2026
a0b49e8
fix(exec): update Docker network handling and utilize shared helpers …
mstrhakr Apr 9, 2026
7ccc40f
fix(icon): enhance icon URL handling to accept data:image URLs and ad…
mstrhakr Apr 9, 2026
7ca5954
fix: add custom YAML tags support and improve YAML loading functionality
mstrhakr Apr 1, 2026
d9e48cf
fix(yaml): enhance support for custom YAML tags and add corresponding…
mstrhakr Apr 9, 2026
a10aeb7
fix(yaml): remove fallback from custom tags and surface errors to use…
mstrhakr Apr 10, 2026
688508a
fix(yaml): harden js-yaml loading and prevent tagged override data loss
mstrhakr Apr 10, 2026
938fd48
Merge pull request #88 from mstrhakr/fix/custom-yaml-tags
mstrhakr Apr 10, 2026
97f2e6e
fix(tests): enhance PHPUnit and BATS configurations, improve test set…
mstrhakr Apr 10, 2026
55613da
feat(stack): centralize container counts and stack state management
mstrhakr Apr 10, 2026
940ffee
fix(stack): derive running state from DOM instead of stale server res…
mstrhakr Apr 10, 2026
57c8aea
fix(stack): derive running state from DOM and remove stale isRunning …
mstrhakr Apr 10, 2026
3e0df46
feat(stack): centralize profile management by introducing effective p…
mstrhakr Apr 10, 2026
562d25d
fix(stack): simplify stack status display logic and update prompt for…
mstrhakr Apr 10, 2026
68a1f31
fix(stack): update container ID collection to use getContainerList me…
mstrhakr Apr 10, 2026
9e75c8f
fix(tests): correct string escaping in checkStackUpdates onclick handler
mstrhakr Apr 10, 2026
4ff41e0
fix(submodule): update tests/framework submodule branch to main
mstrhakr Apr 10, 2026
57e001f
fix(auto-update): centralize shell command resolution for auto-update…
mstrhakr Apr 10, 2026
b3756ae
fix(auto-update): revert some changes and improve test environment setup
mstrhakr Apr 10, 2026
2a9027b
fix(tests): centralize shell wrapper for autoupdate tests
mstrhakr Apr 10, 2026
c0097e1
fix(profiles): prefer running profiles for multi-stack up/update
mstrhakr Apr 10, 2026
80857dd
fix(state): count non-running unknown container states as stopped
mstrhakr Apr 10, 2026
608a0de
fix(dashboard): map paused stacks into partial summary bucket
mstrhakr Apr 10, 2026
a391081
fix(profiles): fix profile selection logic for compose actions
mstrhakr Apr 11, 2026
082d8a9
fix(stack): centralize container counts and optimize state retrieval
mstrhakr Apr 11, 2026
e5825bd
chore(submodule): pin tests/framework to v0.2
mstrhakr Apr 11, 2026
0cceef1
Merge pull request #90 from mstrhakr/fix/centralize-stack-status-counts
mstrhakr Apr 11, 2026
7ffdade
fix(patch): update patch setup in plg and remove deprecated patches
mstrhakr Apr 12, 2026
865f83e
fix(plugin): update paths for plugin and emhttp locations to use vari…
mstrhakr Apr 12, 2026
80cd705
fix(build): sed was too broad and messed up plg when doing local dev
mstrhakr Apr 13, 2026
270cc16
refactor(plg): extract Ace editor installation and patch utility scripts
mstrhakr Apr 13, 2026
44bc88c
fix(install-ace): improve error handling for directory creation and c…
mstrhakr Apr 13, 2026
9850d04
fix(styles): enhance comments for ComboButton and EditorModal CSS files
mstrhakr Apr 13, 2026
798a9f0
fix(tests): update comments to clarify source command
mstrhakr Apr 13, 2026
8e173b1
feat(compose): add profile name persistence for stack operations
mstrhakr Apr 13, 2026
0937c18
fix(docs): update file and module annotations in composeStackUtils.js
mstrhakr Apr 13, 2026
c5c9dc2
fix(docs): enhance comments for LockButton chaining contract in compo…
mstrhakr Apr 13, 2026
b0f7a3e
fix: update socket handling to use COMPOSE_TTYD_SOCKET_DIR for consis…
mstrhakr Apr 13, 2026
5f589a9
feat(tests): add unit tests for top-level dev scripts
mstrhakr Apr 13, 2026
96faf28
feat(install): add informational messages for Ace editor and patch ut…
mstrhakr Apr 13, 2026
3ef12e2
refactor(exec): move utility functions to Util.php and move image nor…
mstrhakr Apr 13, 2026
c8c57f4
refactor(logging): add explicit category handling and align clientDeb…
mstrhakr Apr 13, 2026
af3e015
fix(tests): remove ExecHelpers.php dependency and update function cal…
mstrhakr Apr 13, 2026
d663566
fix(tests): update docker command assertion to match image format
mstrhakr Apr 13, 2026
dd33457
fix(install): update variable assignment syntax for PACKAGE_TAR and P…
mstrhakr Apr 13, 2026
9d6846f
fix(ace): update Ace editor version limits for fallback installations
mstrhakr Apr 13, 2026
b40ce3e
fix(install): enhance messaging for Ace editor and patches installati…
mstrhakr Apr 13, 2026
b2e1dfa
chore(versions): update COMPOSE_VERSION to 5.1.2
mstrhakr Apr 13, 2026
72b48a2
feat(version): update default Docker Compose version to 5.1.2 across …
mstrhakr Apr 13, 2026
234d014
chore: update changelog for v2026.04.13.1913 [skip ci]
github-actions[bot] Apr 13, 2026
03e18fb
Release v2026.04.13.1913 [skip ci]
github-actions[bot] Apr 13, 2026
bad8766
Merge remote-tracking branch 'origin/main' into dev
mstrhakr Apr 13, 2026
ac7c18d
chore: update changelog for v2026.04.13.1951 [skip ci]
github-actions[bot] Apr 13, 2026
f19fc64
Release v2026.04.13.1951 [skip ci]
github-actions[bot] Apr 13, 2026
649591e
fix(pkg_build): update unzip download mirror and validate checksum on…
mstrhakr Apr 14, 2026
5a38695
test(StackInfoTest): add tests for indirect project handling with exi…
mstrhakr Apr 15, 2026
b6e3c72
fix(helpers): add socket override for command execution and logging t…
mstrhakr Apr 15, 2026
f4ee662
fix: add --ignore-buildable option to pull command to skip services w…
mstrhakr Apr 15, 2026
c6a27e3
feat: display plugin and Docker Compose versions in the credits section
mstrhakr Apr 15, 2026
116e92c
chore: update changelog for v2026.04.15.1634 [skip ci]
github-actions[bot] Apr 15, 2026
914ee48
Release v2026.04.15.1634 [skip ci]
github-actions[bot] Apr 15, 2026
7191b8b
feat: add clearIconCache action to remove service icons from cache
mstrhakr Apr 16, 2026
716fa1f
chore: update changelog for v2026.04.16.0728 [skip ci]
github-actions[bot] Apr 16, 2026
6d51bd1
Release v2026.04.16.0728 [skip ci]
github-actions[bot] Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@
"files.eol": "\n"
},

// PHPUnit Test Explorer settings
"phpunit.php": "php",
"phpunit.phpunit": "vendor/bin/phpunit",
"phpunit.args": ["--testdox"],
// Plugin Tests extension settings
// Restrict test discovery to this folder in multi-root workspaces.
"pluginTests.workspaceFolders": ["compose_plugin"],

// PHPUnit settings
"pluginTests.phpunit.enabled": true,
"pluginTests.phpunit.pattern": "tests/**/*Test.php",
"pluginTests.phpunit.exclude": "**/vendor/**,**/node_modules/**,tests/framework/**",
"pluginTests.phpunit.executable": "vendor/bin/phpunit",

// BATS settings
"pluginTests.bats.enabled": true,
"pluginTests.bats.pattern": "tests/**/*.bats",
"pluginTests.bats.exclude": "**/vendor/**,**/node_modules/**,tests/framework/**",
"pluginTests.bats.useDocker": false,

// PHP settings
"php.validate.enable": true,
Expand All @@ -28,7 +39,6 @@
"*.cfg": "ini"
},

// BATS - use framework's Docker wrapper for cross-platform consistency
"bats-test-runner.testPattern": "**/*.bats",
"bats-test-runner.batsExecutable": "${workspaceFolder}/tests/framework/bin/run-bats.cmd"
// Optional test timeout (ms)
"pluginTests.timeout": 30000
}
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Skip running tests before building. Not recommended.

.PARAMETER ComposeVersion
Docker Compose version to include. Default: 5.0.2
Docker Compose version to include. Default: 5.1.2

.EXAMPLE
./build.ps1
Expand Down Expand Up @@ -58,7 +58,7 @@ if (Test-Path $versionsFile) {
if ($_ -match '^COMPOSE_VERSION=(.+)$' -and -not $ComposeVersion) { $ComposeVersion = $Matches[1].Trim() }
}
}
if (-not $ComposeVersion) { $ComposeVersion = "5.0.2" }
if (-not $ComposeVersion) { $ComposeVersion = "5.1.2" }

# Generate dev version with timestamp if -Dev flag is used
if ($Dev) {
Expand Down
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [[ -z "$COMPOSE_VERSION" && -f "$VERSIONS_FILE" ]]; then
fi
done < "$VERSIONS_FILE"
fi
: "${COMPOSE_VERSION:=5.0.2}"
: "${COMPOSE_VERSION:=5.1.2}"

# Generate dev version with timestamp if requested
if [[ "$DEV" = true ]]; then
Expand Down Expand Up @@ -89,8 +89,9 @@ s|^\s*<!ENTITY[[:space:]]+pkgBUILD[[:space:]]+"[^"]*"|<!ENTITY pkgBUILD "$BUILD_
s|^\s*<!ENTITY[[:space:]]+packageName[[:space:]]+"[^"]*"|<!ENTITY packageName "$PACKAGE_BASENAME"|
s|^\s*<!ENTITY[[:space:]]+packagefile[[:space:]]+"[^"]*"|<!ENTITY packagefile "$PACKAGE_NAME"|
s|^\s*<!ENTITY[[:space:]]+packageURL[[:space:]]+"[^"]*"|<!ENTITY packageURL "file:///tmp/$PACKAGE_NAME"|
s|^\s*<FILE[[:space:]]+Name=['"]?[^'">]+['"]?.*|<FILE Name='/tmp/$PACKAGE_NAME' Run='upgradepkg --install-new'>|
s|^\s*<URL>.*</URL>|<URL>file:///tmp/$PACKAGE_NAME</URL>|
# Only rewrite the package-install FILE block (the one with upgradepkg), not Ace or other FILE blocks
s|^\s*<FILE[[:space:]]+Name=['"]?[^'">]+['"]?[[:space:]]+Run=['"]upgradepkg[^'"]*['"]>|<FILE Name='/tmp/$PACKAGE_NAME' Run='upgradepkg --install-new'>|
/upgradepkg/,/<\/FILE>/{ s|^\s*<URL>.*</URL>|<URL>file:///tmp/$PACKAGE_NAME</URL>| }
SEDEOF
sed -E -f "$SED_SCRIPT" "$PLG_FILE" > "$TEMP_PLG"
rm -f "$SED_SCRIPT"
Expand Down Expand Up @@ -298,7 +299,7 @@ if [[ -f "$PACKAGE_PATH" ]]; then
SED_MD5=$(mktemp)
cat > "$SED_MD5" << SEDEOF
s|^\s*<!ENTITY[[:space:]]+packageMD5[[:space:]]+"[^"]*"|<!ENTITY packageMD5 "$MD5"|
s|^\s*<MD5>.*</MD5>|<MD5>$MD5</MD5>|
/upgradepkg/,/<\/FILE>/{ s|^\s*<MD5>.*</MD5>|<MD5>$MD5</MD5>| }
SEDEOF
sed -i -E -f "$SED_MD5" "$TEMP_PLG"
rm -f "$SED_MD5"
Expand Down
2 changes: 1 addition & 1 deletion build_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# shellcheck disable=SC1091
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
[ -f "${SCRIPT_DIR}/versions.env" ] && source "${SCRIPT_DIR}/versions.env"
[ -z "$COMPOSE_VERSION" ] && COMPOSE_VERSION=5.0.2
[ -z "$COMPOSE_VERSION" ] && COMPOSE_VERSION=5.1.2
[ -z "$PKG_VERSION" ] && PKG_VERSION="$(date +%Y.%m.%d)"
[ -z "$PKG_BUILD" ] && PKG_BUILD="$(date +%H%M)"
docker run --rm --tmpfs /tmp \
Expand Down
216 changes: 97 additions & 119 deletions compose.manager.plg
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "compose.manager">
<!ENTITY author "mstrhakr">
<!ENTITY version "2026.04.10">
<!ENTITY version "2026.04.16.0728">
<!ENTITY launch "Settings/&name;.settings">
<!ENTITY packageVER "&version;">
<!ENTITY packageMD5 "ad0053b8361f39c14abc0bf824eb16e4">
<!ENTITY pkgBUILD "2116">
<!ENTITY packageMD5 "488f6075d715293b85da70c87ca6fccf">
<!ENTITY pkgBUILD "0728">
<!ENTITY packageName "&name;-&packageVER;-noarch-&pkgBUILD;">
<!ENTITY packagefile "&packageName;.txz">
<!ENTITY github "mstrhakr/compose_plugin">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/main/&name;.plg">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/dev/&name;.plg">
<!ENTITY packageURL "https://github.com/&github;/releases/download/v&version;/&packagefile;">
<!ENTITY pluginLOC "/boot/config/plugins/&name;">
<!ENTITY emhttpLOC "/usr/local/emhttp/plugins/&name;">
<!ENTITY pluginsPATH "/boot/config/plugins">
<!ENTITY pluginLOC "&pluginsPATH;/&name;">
<!ENTITY emhttpPATH "/usr/local/emhttp/plugins">
<!ENTITY emhttpLOC "&emhttpPATH;/&name;">
<!ENTITY pluginsInstalledPATH "/var/log/packages">
<!ENTITY aceVER "1.43.5">
<!ENTITY aceURL "https://github.com/ajaxorg/ace-builds/archive/refs/tags/v&aceVER;.zip">
<!ENTITY aceZIP "ace-v&aceVER;.zip">
<!ENTITY aceSHA256 "40169719746a5f83dcfb6e73a838221d34b91b75a939569217d62fb7d8175562">
]>

<PLUGIN name="&name;"
Expand All @@ -31,20 +36,22 @@
>

<CHANGES>
###2026.04.10
- Bug Fixes (stack): detect existing compose files via getComposeFilePath before creating default; fixes #91
- [View all changes](https://github.com/mstrhakr/compose_plugin/compare/v2026.04.08...v2026.04.10)
###2026.04.16.0728
- Features: add clearIconCache action to remove service icons from cache
- [PR #93](https://github.com/mstrhakr/compose_plugin/pull/93)
- [beta release diff](https://github.com/mstrhakr/compose_plugin/compare/v2026.04.10...v2026.04.16.0728)
</CHANGES>

<!-- The 'pre-install' script. -->
<FILE Run="/bin/bash">
<INLINE>
# Remove old 'source' files
# Remove all but current package file and ace zip from plugin root
rm -f $(ls &pluginLOC;/&name;*.txz 2>/dev/null|grep -v '&packageVER;')
rm -f $(ls &pluginLOC;/ace-v*.zip 2>/dev/null|grep -v '&aceZIP;')

# Clean up legacy package entries (compose.manager-package-*) left by older builds
# that used non-standard Slackware naming and weren't removed by upgradepkg
for pkg in /var/log/packages/&name;-package-*; do
for pkg in &pluginsInstalledPATH;/&name;-package-*; do
[ -e "$pkg" ] &amp;&amp; removepkg "$(basename "$pkg")" 2>/dev/null || true
done

Expand All @@ -53,145 +60,116 @@ mkdir -p &pluginLOC;/projects
</INLINE>
</FILE>

<!-- The 'install' script. -->
<FILE Name="&pluginLOC;/&packagefile;" Run="upgradepkg --install-new">
<URL>&packageURL;</URL>
<MD5>&packageMD5;</MD5>
</FILE>

<FILE Run="/bin/bash">
<INLINE>
# Download Ace editor if not already provided by Unraid (Unraid 7.0.0+ includes it via Dynamix)
ACE_DYNAMIX_PATH="/usr/local/emhttp/plugins/dynamix/javascript/ace/ace.js"
ACE_PLUGIN_DIR="&emhttpLOC;/javascript/ace"

if [ -f "$ACE_DYNAMIX_PATH" ]; then
echo "Ace editor found at $ACE_DYNAMIX_PATH (Unraid 7.0.0+), skipping download."
else
echo "Ace editor not found in Dynamix (pre-7.0.0 Unraid), downloading v&aceVER;..."
mkdir -p "$ACE_PLUGIN_DIR"
TMPDIR_ACE="/tmp/ace-install-$$"
mkdir -p "$TMPDIR_ACE"
WGET_CERT_OPTS=""
if [ ! -f /etc/ssl/certs/ca-certificates.crt ] &amp;&amp; [ ! -d /etc/ssl/certs ]; then
echo "WARNING: No system CA bundle found; downloading Ace with TLS verification disabled."
WGET_CERT_OPTS="--no-check-certificate"
fi
if wget $WGET_CERT_OPTS -q -O "$TMPDIR_ACE/ace.zip" "&aceURL;"; then
if unzip -q "$TMPDIR_ACE/ace.zip" \
"ace-builds-&aceVER;/src-min-noconflict/ace.js" \
"ace-builds-&aceVER;/src-min-noconflict/mode-yaml.js" \
"ace-builds-&aceVER;/src-min-noconflict/mode-sh.js" \
"ace-builds-&aceVER;/src-min-noconflict/theme-tomorrow.js" \
"ace-builds-&aceVER;/src-min-noconflict/theme-tomorrow_night.js" \
-d "$TMPDIR_ACE/extracted"; then
if cp "$TMPDIR_ACE/extracted/ace-builds-&aceVER;/src-min-noconflict/"*.js "$ACE_PLUGIN_DIR/"; then
if [ -f "$ACE_PLUGIN_DIR/ace.js" ]; then
echo "Ace editor v&aceVER; installed to $ACE_PLUGIN_DIR"
else
echo "WARNING: Ace editor files not found in $ACE_PLUGIN_DIR after install. Editor will lack syntax highlighting."
fi
else
echo "WARNING: Failed to copy Ace editor files. Editor will lack syntax highlighting."
fi
else
echo "WARNING: Failed to extract Ace editor archive. Editor will lack syntax highlighting."
fi
else
echo "WARNING: Failed to download Ace editor. The YAML/env editor will not have syntax highlighting."
fi
rm -rf "$TMPDIR_ACE"
fi
echo ""
echo "----------------------------------------------------"
echo ""
echo " Ace editor v&aceVER; will only be downloaded and"
echo " installed for pre-7.0 Unraid versions."
echo ""
echo " If on 7.0 or later, Ace editor files are included"
echo " by default and skips will be shown below."
echo ""
echo "----------------------------------------------------"
echo ""
</INLINE>
</FILE>

<!-- Ace editor fallback for pre-7.0: download zip to flash cache -->
<FILE Name="&pluginLOC;/cache-&aceZIP;" Max="6.99.99">
<URL>&aceURL;</URL>
<SHA256>&aceSHA256;</SHA256>
</FILE>

<!-- Ace editor fallback for pre-7.0: copy cached zip to /tmp for extraction -->
<FILE Name="/tmp/temp-&aceZIP;" Max="6.99.99">
<LOCAL>&pluginLOC;/cache-&aceZIP;</LOCAL>
<SHA256>&aceSHA256;</SHA256>
</FILE>

<!-- Ace editor fallback for pre-7.0: extract needed JS files into plugin dir -->
<FILE Name="/tmp/ace-editor-install.sh" Run="/bin/bash" Max="6.99.99">
<INLINE>
&emhttpLOC;/scripts/install-ace.sh /tmp/temp-&aceZIP; &emhttpLOC; &aceVER;
rm -f /tmp/ace-editor-install.sh
</INLINE>
</FILE>

<FILE Run="/bin/bash">
<INLINE>
# Use the new patch utility during install to cleanup and optionally apply patches
patch_script=/usr/local/emhttp/plugins/compose.manager/scripts/patch.sh
config_file=/boot/config/plugins/compose.manager/compose.manager.cfg
if [ -f "$patch_script" ]; then
if [ -f "$config_file" ]; then
#Grab the contents of our config file.
source &lt;(grep = $config_file)
patch_ui=${PATCH_UI:='false'}
# Parse /etc/unraid-version into numeric form: M*10000 + m*100 + p
# Handles formats like: 6.10.2 or "7.2.3" by extracting the first X.Y.Z
ver=$(grep -oE '[0-9]+(\.[0-9]+){0,2}' /etc/unraid-version | head -n1)
IFS=. read -r major minor patch &lt;&lt;&lt; "$ver"
major=${major:-0}; minor=${minor:-0}; patch=${patch:-0}
unraid_version=$((major*10000 + minor*100 + patch))

if [ $unraid_version -ge 61000 ] &amp;&amp; [ $unraid_version -le 69999 ] &amp;&amp; [ $patch_ui == 'true' ]; then
echo ""
echo "----------------------------------------------------"
echo " Applying WebUI Patches because PATCH_UI=true"
echo "----------------------------------------------------"
echo ""
#Remove patchs if already applied
$patch_script -r

#Apply Patches
$patch_script apply || true
fi
if [ $unraid_version -ge 61000 ] &amp;&amp; [ $unraid_version -le 69999 ] &amp;&amp; [ $patch_ui != 'true' ]; then
echo ""
echo "----------------------------------------------------"
echo " Removing WebUI Patches because PATCH_UI=false"
echo " To enable the WebUI, set PATCH_UI=true in &name;.cfg"
echo " and apply patches from the plugin settings page."
echo "----------------------------------------------------"
echo ""
$patch_script -r
fi
fi
fi
echo ""
echo "----------------------------------------------------"
echo ""
echo " Patches are only installed for"
echo " pre-6.12 Unraid versions."
echo ""
echo " If on 6.12 or later, patches are not needed"
echo " and skips will be shown below."
echo ""
echo "----------------------------------------------------"
echo ""
</INLINE>
</FILE>

<!-- Patch utility installation for pre-6.12: install or remove patches -->
<FILE Name="/tmp/patch-util-install.sh" Run="/bin/bash" Max="6.11.99">
<INLINE>
&emhttpLOC;/scripts/install-patch.sh install &emhttpLOC; &pluginLOC;
rm -f /tmp/patch-util-install.sh
</INLINE>
</FILE>

<FILE Run="/bin/bash">
<INLINE>
echo ""
echo "----------------------------------------------------"
echo ""
echo " Compose Manager Plus has been installed."
echo " Version: &version;"
echo " Version: &version;"
echo ""
echo "----------------------------------------------------"
echo ""
</INLINE>
</FILE>

<FILE Run="/bin/bash" Method="remove">
<INLINE>
# Use the new patch utility during install to cleanup and optionally apply patches
patch_script=/usr/local/emhttp/plugins/compose.manager/scripts/patch.sh
config_file=/boot/config/plugins/compose.manager/compose.manager.cfg
if [ -f "$patch_script" ]; then
if [ -f "$config_file" ]; then
#Grab the contents of our config file.
source &lt;(grep = $config_file)
patch_ui=${PATCH_UI:='false'}
# Parse /etc/unraid-version into numeric form: M*10000 + m*100 + p
# Handles formats like: 6.10.2 or "7.2.3" by extracting the first X.Y.Z
ver=$(grep -oE '[0-9]+(\.[0-9]+){0,2}' /etc/unraid-version | head -n1)
IFS=. read -r major minor patch &lt;&lt;&lt; "$ver"
major=${major:-0}; minor=${minor:-0}; patch=${patch:-0}
unraid_version=$((major*10000 + minor*100 + patch))

if [ $unraid_version -ge 61000 ] &amp;&amp; [ $unraid_version -le 69999 ] &amp;&amp; [ $patch_ui == 'true' ]; then
echo ""
echo "----------------------------------------------------"
echo " Removing WebUI Patches because plugin is being removed"
echo "----------------------------------------------------"
echo ""
#Remove patchs if already applied
$patch_script -r
fi
fi
fi
echo ""
echo "----------------------------------------------------"
echo ""
echo " Patches are only modified for"
echo " pre-6.12 Unraid versions."
echo ""
echo " If on 6.12 or later, patches are not needed"
echo " and skips will be shown below."
echo ""
echo "----------------------------------------------------"
echo ""
</INLINE>
</FILE>

<!-- Patch utility removal for pre-6.12: remove patches -->
<FILE Name="/tmp/patch-util-remove.sh" Run="/bin/bash" Method="remove" Max="6.11.99">
<INLINE>
&emhttpLOC;/scripts/install-patch.sh remove &emhttpLOC; &pluginLOC;
rm -f /tmp/patch-util-remove.sh
</INLINE>
</FILE>

<!-- Uninstall script; plus cleanup old/unused packages -->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
# Remove all Slackware package entries for this plugin.
# Handles both new naming (compose.manager-VERSION-noarch-1) and
# legacy naming (compose.manager-package-VERSION) left by older builds.
for pkg in /var/log/packages/&name;-*; do
for pkg in &pluginsInstalledPATH;/&name;-*; do
[ -e "$pkg" ] &amp;&amp; removepkg "$(basename "$pkg")" 2>/dev/null || true
done

Expand Down
2 changes: 1 addition & 1 deletion deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ param(
[string]$RemoteDir = "/tmp",
[string]$PackagePath,
[switch]$SkipBuild,
[string]$ComposeVersion = "5.0.2",
[string]$ComposeVersion = "5.1.2",
[string]$AceVersion = "1.43.5",
[switch]$Quick
)
Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ USER_NAME="root"
REMOTE_DIR="/tmp"
PACKAGE_PATH=""
SKIP_BUILD=false
COMPOSE_VERSION="5.0.2"
COMPOSE_VERSION="5.1.2"
QUICK=false

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down
Loading