Git Product home page Git Product logo

magento-packager's Introduction

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].

magento-packager's People

Contributors

datenbrille avatar

Stargazers

Chris Norton avatar

Watchers

Michael Klapper avatar Fabrizio Branca avatar James Cloos avatar Chris Norton avatar

Forkers

fontis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.