Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

A simple packaging script for magento connect 2.0 based on a composer.json.

Notifications You must be signed in to change notification settings

AOEmedia/Magento-Packager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento-Packager

A simple packaging script for magento connect 2.0 based on a composer.json.

The script relies on a working magento setup. It will not work standalone and it is recommend to install ist with modman.

The script gather all his information from composer.json file. An example is attached below and in the example folder.

Output will be written in path to magento/var/connect/modulename.tgz.

Guide to use this script

  1. install the script with modman modman clone [email protected]:Flagbit/Magento-Packager.git
  2. go to /shell
  3. run php packager.php --composer

Guide to create a composer.json

Example

{
    "name":"module_vendor/module_name",
    "type":"magento-module",
    "license":"GPL-3.0",
    "description":"",
    "homepage":"http://example.com",
    "authors":[
        {
            "name":"Author 1",
            "email":"[email protected]"
        },
        {
            "name":"Author 2",
            "email":"[email protected]"
        }
    ],
    "extra":{
        "magento_connect":{
            "channel":"community",
            "php_min":"5.3.0",
            "php_max":"6.0.0",
            "stability":"beta",
            "content":[
                {
                    "type":"magecommunity",
                    "structure":"dir",
                    "path":"module_vendor/module_name"
                },
                {
                    "type":"mageetc",
                    "structure":"file",
                    "path":"modules/module_config_file_name.xml"
                },
                {
                    "type":"mage",
                    "structure":"file",
                    "path":"just a random file path"
                }
            ]
        }
    }
}

Elements

name

The name of the module in magento style notation. Something like flagbit/packager. It should be writen everything in lowser first letter case.

type

If you would like to install extensions via composer magento installer you should use magento-module. The packager ignore this property.

license

Please use some key from [http://www.spdx.org/licenses/].

description

A detailed description of you module. It will be used as description and summery.

homepage

Nothing more to say

authors

Who developed the module

magento_connect channel

Which channel should be used in magento connect.

magento_connect php_min

The minimum required version for PHP

magento_connect php_max

The maximum support version of PHP

magento_connect stability

Please use some key from [http://getcomposer.org/doc/04-schema.md#minimum-stability]

magento_connect content

Most complicated part of the config file. You need to tell the packager which files you want to put where in the archive. It is very similar to modman but you need to tell magento the type, if it is a file or directory and the path of the source.

type can be one of the following:

<targets>
	<target name="magelocal" label="Magento Local module file" uri="./app/code/local" />
	<target name="magecommunity" label="Magento Community module file" uri="./app/code/community" />
	<target name="magecore" label="Magento Core team module file" uri="./app/code/core" />
	<target name="magedesign" label="Magento User Interface (layouts, templates)" uri="./app/design" />
	<target name="mageetc" label="Magento Global Configuration" uri="./app/etc" />
	<target name="magelib" label="Magento PHP Library file" uri="./lib" />
	<target name="magelocale" label="Magento Locale language file" uri="./app/locale" />
	<target name="magemedia" label="Magento Media library" uri="./media" />
	<target name="mageskin" label="Magento Theme Skin (Images, CSS, JS)" uri="./skin" />
	<target name="mageweb" label="Magento Other web accessible file" uri="." />
	<target name="magetest" label="Magento PHPUnit test" uri="./tests" />
	<target name="mage" label="Magento other" uri="." />
</targets>

structure can be file or dir

path is the path to your source files.

History

This script was developed first within [https://github.com/Flagbit/Magento-FilterUrls].

About

A simple packaging script for magento connect 2.0 based on a composer.json.

Resources

Stars

Watchers

Forks

Packages

No packages published