Skip to content

Commit

Permalink
Provision the weblinks package manifest, it'll be needed for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Sep 1, 2014
1 parent 9930395 commit beef0e7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions administrator/components/com_admin/script.php
Expand Up @@ -1101,6 +1101,18 @@ public function deleteUnexistingFiles()
echo JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder) . '<br />';
}
}

/*
* Needed for updates post-3.4
* If com_weblinks doesn't exist then assume we can delete the weblinks package manifest (included in the update packages)
*/
if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_weblinks/weblinks.php'))
{
if (JFile::exists(JPATH_MANIFESTS . '/packages/pkg_weblinks.xml'))
{
JFile::delete(JPATH_MANIFESTS . '/packages/pkg_weblinks.xml');
}
}
}

/**
Expand Down
30 changes: 30 additions & 0 deletions administrator/manifests/packages/pkg_weblinks.xml
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.4" method="upgrade">
<name>pkg_weblinks</name>
<packagename>weblinks</packagename>
<creationDate>December 2012</creationDate>
<packager>Joomla! Project</packager>
<copyright>(C) 2005 - 2014 Open Source Matters. All rights reserved.</copyright>
<packageremail>admin@joomla.org</packageremail>
<packagerurl>www.joomla.org</packagerurl>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.4.0</version>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<description>PKG_WEBLINKS_XML_DESCRIPTION</description>
<files folder="packages">
<!-- The id for each extension is the element stored in the DB -->
<file type="component" id="com_weblinks">com_weblinks.zip</file>
<file type="module" id="mod_weblinks" client="site">mod_weblinks.zip</file>
<file type="plugin" id="weblinks" group="finder">plg_finder_weblinks.zip</file>
<file type="plugin" id="weblinks" group="search">plg_search_weblinks.zip</file>
</files>
<languages>
<language tag="en-GB">language/en-GB/en-GB.pkg_weblinks.sys.ini</language>
</languages>
<updateservers>
<!-- Note: No spaces or linebreaks allowed between the server tags -->
<server type="extension" name="Weblinks Update Site">https://raw.githubusercontent.com/joomla-extensions/weblinks/master/manifest.xml</server>
</updateservers>
</extension>
6 changes: 6 additions & 0 deletions build/build.php
Expand Up @@ -184,6 +184,9 @@
echo "Build full package files.\n";
chdir($fullVersion);

// The weblinks package manifest should not be present for new installs, temporarily move it
system('mv administrator/manifests/packages/pkg_weblinks.xml ../pkg_weblinks.xml');

// Create full archive packages.
system('tar --create --bzip2 --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Full_Package.tar.bz2 * > /dev/null');

Expand All @@ -202,6 +205,9 @@
system('rm images/joomla_logo_black.jpg');
system('rm images/powered_by.png');

// Move the weblinks manifest back
system('mv ../pkg_weblinks.xml administrator/manifests/packages/pkg_weblinks.xml');

system('tar --create --bzip2 --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Update_Package.tar.bz2 * > /dev/null');

system('tar --create --gzip --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Update_Package.tar.gz * > /dev/null');
Expand Down

0 comments on commit beef0e7

Please sign in to comment.