Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 56 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
run: |
for i in {1..40}; do
if curl -f http://localhost:8080/installation/index.php > /dev/null 2>&1; then
echo "Joomla installer is ready"
echo "Joomla installer is ready"
break
fi
echo "Waiting for Joomla installer..."
echo "Waiting for Joomla installer..."
sleep 10
done

Expand Down Expand Up @@ -122,29 +122,74 @@ jobs:
id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Create component zip with version
- name: Extract wordpress plugin version
run: |
version_wordpress=$(grep -oP '<version>\K[^<]+' src/plugins/migration/wordpress/wordpress.xml)
echo "version_wordpress=$version_wordpress" >> $GITHUB_ENV

- name: Extract wp-all-export plugin version
run: |
version_wp_all_export=$(grep -oP '\* Version:\s*\K[^\s]+' src/cms-export-plugins/ja-wp-all-export/wp-all-export.php)
echo "version_wp_all_export=$version_wp_all_export" >> $GITHUB_ENV

- name: Update XML versions
run: |
sed -i "s|<version>.*</version>|<version>${{ steps.version.outputs.version }}</version>|" src/component/cmsmigrator.xml
sed -i "s|<version>.*</version>|<version>${{ steps.version.outputs.version }}</version>|" src/modules/mod_migrationnotice/mod_migrationnotice.xml
sed -i "s|<version>.*</version>|<version>${{ steps.version.outputs.version }}</version>|" pkg_cmsmigrator.xml

- name: Create component zip
run: |
mkdir -p cypress/fixtures
cd src/component
zip -r ../../cypress/fixtures/com_cmsmigrator_v${{ steps.version.outputs.version }}.zip .

- name: Verify zip file exists
run: ls -lh cypress/fixtures/
- name: Create module zip
run: |
cd src/modules/mod_migrationnotice
zip -r ../../../cypress/fixtures/mod_migrationnotice.zip .

- name: Update XML version
- name: Create package zip
run: |
sed -i "s|<version>.*</version>|<version>${{ steps.version.outputs.version }}</version>|" src/component/cmsmigrator.xml
# Copy package manifest and language files to fixtures
cp pkg_cmsmigrator.xml cypress/fixtures/
cp -r language cypress/fixtures/

# Create constituents directory and move component/module zips there
cd cypress/fixtures
mkdir -p constituents
cp com_cmsmigrator_v${{ steps.version.outputs.version }}.zip constituents/com_cmsmigrator.zip
cp mod_migrationnotice.zip constituents/

# Create the package zip with the new structure
zip -r pkg_cmsmigrator_v${{ steps.version.outputs.version }}.zip \
pkg_cmsmigrator.xml \
constituents/ \
language/

- name: Create wordpress plugin zip
run: |
cd src/plugins/migration/wordpress
zip -r ../../../../cypress/fixtures/plg_wordpress_v${{ env.version_wordpress }}.zip .

- name: Create wp-all-export plugin zip
run: |
cd src/cms-export-plugins/ja-wp-all-export
zip -r ../../../cypress/fixtures/ja_wp_all_export_v${{ env.version_wp_all_export }}.zip .

- name: Verify zip files exist
run: ls -lh cypress/fixtures/

- name: Commit version update
- name: Commit version updates
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add src/component/cmsmigrator.xml
git add src/component/cmsmigrator.xml src/modules/mod_migrationnotice/mod_migrationnotice.xml pkg_cmsmigrator.xml
git commit -m "Bump version to ${{ steps.version.outputs.version }}" || echo "No changes to commit"
git push origin main

- name: Upload asset to GitHub Release
- name: Upload assets to GitHub Release
run: |
gh release upload ${{ github.event.release.tag_name }} cypress/fixtures/com_cmsmigrator_v${{ steps.version.outputs.version }}.zip --clobber
gh release upload ${{ github.event.release.tag_name }} cypress/fixtures/pkg_cmsmigrator_v${{ steps.version.outputs.version }}.zip cypress/fixtures/plg_wordpress_v${{ env.version_wordpress }}.zip cypress/fixtures/ja_wp_all_export_v${{ env.version_wp_all_export }}.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions language/en-GB/pkg_cmsmigrator.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; Package Language File
PKG_CMSMIGRATOR="CMS Migrator Package"
PKG_CMSMIGRATOR_DESCRIPTION="This component helps in migrating websites from other platforms to Joomla."
PKG_CMSMIGRATOR_INSTALL_SUCCESS="CMS Migrator Package has been successfully installed!"
PKG_CMSMIGRATOR_UNINSTALL_SUCCESS="CMS Migrator Package has been successfully uninstalled!"
PKG_CMSMIGRATOR_UPDATE_SUCCESS="CMS Migrator Package has been successfully updated!"
3 changes: 3 additions & 0 deletions language/en-GB/pkg_cmsmigrator.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; Package System Language File
PKG_CMSMIGRATOR="CMS Migrator Package"
PKG_CMSMIGRATOR_DESCRIPTION="This component helps in migrating websites from other platforms to Joomla."
39 changes: 39 additions & 0 deletions pkg_cmsmigrator.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* @package CMS Migrator Package
* @subpackage pkg_cmsmigrator
* @copyright Copyright (C) 2025 Open Source Matters, Inc.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-->
<extension type="package" version="5.0" method="install">
<name>PKG_CMSMIGRATOR</name>
<packagename>cmsmigrator</packagename>

<author>Joomla Academy</author>
<authorEmail></authorEmail>
<creationDate>2025-10-03</creationDate>
<copyright>(C) 2025 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>0.9.0</version>
<description>PKG_CMSMIGRATOR_DESCRIPTION</description>
<packager>Joomla Academy</packager>
<packagerurl>https://github.com/joomla-projects/JA-Advanced-Migration-Tool</packagerurl>

<!-- constituents folder holds the inner extension zips -->
<files folder="constituents">
<file type="component" id="com_cmsmigrator">com_cmsmigrator.zip</file>
<file type="module" id="mod_migrationnotice" client="site">mod_migrationnotice.zip</file>
</files>

<!-- language files (must match files inside /language/en-GB/) -->
<languages folder="language">
<language tag="en-GB">en-GB/pkg_cmsmigrator.ini</language>
<language tag="en-GB">en-GB/pkg_cmsmigrator.sys.ini</language>
</languages>

<updateservers>
<server type="extension" priority="1" name="CMS Migrator Package Updates"><![CDATA[https://api.github.com/repos/joomla-projects/JA-Advanced-Migration-Tool/releases/latest]]></server>
</updateservers>
</extension>
Loading
Loading