Coder Social home page Coder Social logo

magedownload-cli's Introduction

MageDownload CLI

Build Status Scrutinizer Code Quality codecov.io

A PHP tool to automate Magento release and patch downloads using Magento's download API.

Example Example with Prompts

Installation

.phar

Download the latest magedownload.phar release.

It's now ready to use: php magedownload.phar help

If you want to make it available anywhere on your system

chmod +x magedownload.phar
mv magedownload.phar /usr/local/bin/magedownload

And can be used: magedownload help

n98 magerun

  • Clone to your modules directory
  • Install with composer
mkdir -p ~/.n98-magerun/modules
git clone https://github.com/steverobbins/magedownload-cli ~/.n98-magerun/modules/magedownload-cli
cd ~/.n98-magerun/modules/magedownload-cli
curl -sS https://getcomposer.org/installer | php
php composer.phar install

Source

  • Clone this repository
  • Install with composer
git clone https://github.com/steverobbins/magedownload-cli
cd magedownload-cli
curl -sS https://getcomposer.org/installer | php
php composer.phar install

Usage

See the help command for all command information:

$ php magedownload.phar help

Configuration

To use the Magento download API you must have a user ID and token. These can be generated by logging into your account on magento.com and navigating to Account Settings -> Downloads Access Token.

Once you have your credentials, you can either specify them with each command (using --id and --token options), or use the configure command to save the settings to your environment (in ~/.magedownload/config.yaml).

See php magedownload.phar help configure for details.

Commands

download

$ php magedownload.phar download [<name>] [<destination>] [--extract]

or

$ php n98-magerun.phar download:download [<name>] [<destination>] [--extract]

Downloads the specified file to the given destination. Use the files command to find the correct <name>.

If no name is given, you will be prompted to select a file to download.

If no destination is given, the file is downloaded to current directory.

When --extract is given, the downloaded file will be extracted when possible. The destination must end with .zip, .tar.bz2, or .tar.gz. The files will be extracted to a folder of the same name, without the file extension.

files

$ php magedownload.phar files

or

$ php n98-magerun.phar download:files

Lists files that are available for download.

You may use either --filter-version or --filter-type options to narrow your search. Examples:

  • php magedownload.phar files --filter-version 1.9.2.2
  • php magedownload.phar files --filter-version "1.9.*"
  • php magedownload.phar files --filter-type ce-full

* Due to limitiations with the API, only one filter may be used at a time.

versions

$ php magedownload.phar versions

or

$ php n98-magerun.phar download:versions

Lists all Magento versions that have been released.

Support

Please create an issue for all bugs and feature requests.

Contributing

Fork this repository and send a pull request to the dev branch.

License

Creative Commons Attribution 4.0 International

magedownload-cli's People

Contributors

pocallaghan avatar rafaelstz avatar steverobbins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magedownload-cli's Issues

Command to download all files of one SUPEE patch

It would be quite useful for my workflow, to be able to download all patch files for a specific SUPEE patch, as I manage multiple magento installations with different versions. This might be useful for other users as well, I guess.

My current workflow is to download all patch files manually and put those on my FTP server so I can download the appropriate patch file from all my other servers easily. Also, a colleague has to check each patch file first.

btw: Thanks for this great tool!

PHP Warning: array_merge(): Argument #1 is not an array

PHP Warning:  array_merge(): Argument #1 is not an array in /Users/jeushy/.n98-magerun/modules/magedownload-cli/vendor/steverobbins/magedownload/src/MageDownload/Config.php on line 93

I've tried installing several ways and have tested it with PHP 5.5 and PHP 5.6 installed via homebrew but am having issues with the configuration step saving my account ID and token:

screen shot 2016-11-09 at 11 27 42 pm

$ n98 download:download --id <MY_MAGENTO_ID> --token <MY_TOKEN> 1.9.2.3
Downloading to /Users/jeushy/code/sandbox/magento/community/test/1.9.2.3...
PHP Warning:  file_get_contents(https://[email protected]/products/downloads/file/1.9.2.3): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized
 in /Users/jeushy/.n98-magerun/modules/magedownload-cli/vendor/steverobbins/magedownload/src/MageDownload/AbstractMageDownload.php on line 45

Warning: file_get_contents(https://[email protected]/products/downloads/file/1.9.2.3): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized
 in /Users/jeushy/.n98-magerun/modules/magedownload-cli/vendor/steverobbins/magedownload/src/MageDownload/AbstractMageDownload.php on line 45

"File Description" is missing

Compared to the output of "www.magentocommerce.com/products/downloads/info/files", the column "File Description" is missing.
This data would be useful to exactly see for which Magento versions the patch is suitable.

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.