Skip to content

Commit cbd7511

Browse files
authored
Merge pull request #693 from joomla-extensions/latest-pma
Automate phpMyAdmin version fetching in post-create.sh
2 parents a59e24b + 3081770 commit cbd7511

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.devcontainer/post-create.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ fi
6969
# --- 6. Download and prepare phpMyAdmin ---
7070
PMA_ROOT="/var/www/html/phpmyadmin"
7171
echo "--> Downloading phpMyAdmin into $PMA_ROOT..."
72-
PMA_VERSION=5.2.3
72+
PMA_VERSION=$(curl -s https://api.github.com/repos/phpmyadmin/phpmyadmin/releases/latest | grep '"tag_name":' | sed -E 's/.*"RELEASE_([^"]+)".*/\1/' | tr '_' '.')
73+
74+
echo "The current version is: $PMA_VERSION"
7375
mkdir -p $PMA_ROOT
7476
curl -o /tmp/phpmyadmin.tar.gz https://files.phpmyadmin.net/phpMyAdmin/${PMA_VERSION}/phpMyAdmin-${PMA_VERSION}-all-languages.tar.gz
7577
tar xf /tmp/phpmyadmin.tar.gz --strip-components=1 -C $PMA_ROOT

0 commit comments

Comments
 (0)