astorm / magentotartoconnect Goto Github PK
View Code? Open in Web Editor NEWA small shell script to automatically package tar archives into Magento's Connect 2.0 format.
A small shell script to automatically package tar archives into Magento's Connect 2.0 format.
Firstly, this is AMAZING!
I remember the last time I was doing Connect packaging via the Magento interface and it was such a hassle compared to this.
Okay so my question is whether there is anything special that needs to happen in order to support extension updates using the Direct package file upload feature in the Magento Connect Manager in the Magento backend.
Initial install seems to work fine, but when I try to update a later version, I'm seeing "file already exists" errors.
My apologies in advanced if this is a horrendously stupid question, as I haven't had to deal with Connect packaging very much at all and don't know a ton about it.
The Connect Manager seems like maybe it has better support for updates when you're installing by extension key, as it has a way to check for updates specifically. Perhaps that's the only way to have updates handled nicely?
Doesn't have that Issue with an extension I've packed with Magento Builtin Packager once, but my new one I've never packed with the builtin tools...
But as part of my deploy pipe I delete the files created with Builtin tools.. so they shouldn't matter.
I've I try packaging it with builtin tools it works like charm... any idea ?
If there's a lib folder in the module
app/code/community/Package/Modulename/lib/...
bad things happen. The scripts ends up thinking it's the /lib folder. Maybe the script should do something smarter.
Feature request:
It would be nice to be able to configure the version_ids which are hardcoded to 1,2 at https://github.com/astorm/MagentoTarToConnect/blob/master/magento-tar-to-connect.php#L619
I was trying to build package for PulsestormLauncher. When I try to install the resulting package I get the following error in the Magento Connect Manager:
CONNECT ERROR: Package file is invalid
'.' already exists
To avoid regressions like this
According to this pull request, something's changed in PHP 5.5's XML handling. Come up with a unified/single-code-path approach for finding the the module version in both PHP 5.4 and PH 5.5.
It's absolutely Circle CI related but can't figure it out:
PHP Fatal error: Cannot access self:: when no class scope is active in phar:///home/ubuntu/magento_import/build.phar/magento-tar-to-connect.php on line 531
/tmp/tmpcWf2dz
Fatal error: Cannot access self:: when no class scope is active in phar:///home/ubuntu/magento_import/build.phar/magento-tar-to-connect.php on line 531
Any Ideas ?
Identify argument as ending in .tar. Make appropriate changes to usage.
base dir should work with relative paths.
The following
shell_exec('cp ' . $base_dir . '/' . $archive_files . ' ' . $temp_dir);
happens after a chdir. Modify so base_dir is made absolute if it doesn't have a leading /
.
When I try running this script (as the phar packaged on master), it seems to get past untar'ing, and then either freezes up, or goes into an endless loop where all my memory get's taken up and I have to kill the process. No sign of any package or output file getting created.
Here is the output of packaging up astorm/PulsestormLauncher (as a quick example):
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher> ./build_launcher.bash
a app/code/community/Pulsestorm/Launcher
a app/code/community/Pulsestorm/Launcher/Block
a app/code/community/Pulsestorm/Launcher/controllers
a app/code/community/Pulsestorm/Launcher/etc
a app/code/community/Pulsestorm/Launcher/Helper
a app/code/community/Pulsestorm/Launcher/Model
a app/code/community/Pulsestorm/Launcher/README.md
a app/code/community/Pulsestorm/Launcher/Model/Links.php
a app/code/community/Pulsestorm/Launcher/Model/Observer.php
a app/code/community/Pulsestorm/Launcher/Helper/Data.php
a app/code/community/Pulsestorm/Launcher/etc/adminhtml.xml
a app/code/community/Pulsestorm/Launcher/etc/config.xml
a app/code/community/Pulsestorm/Launcher/etc/system.xml
a app/code/community/Pulsestorm/Launcher/controllers/Pulsestorm
a app/code/community/Pulsestorm/Launcher/controllers/Pulsestorm/LauncherController.php
a app/code/community/Pulsestorm/Launcher/Block/Breadcrumbs.php
a app/code/community/Pulsestorm/Launcher/Block/Page
a app/code/community/Pulsestorm/Launcher/Block/Page/Menu.php
a app/design/adminhtml/default/default/template/pulsestorm_launcher
a app/design/adminhtml/default/default/template/pulsestorm_launcher/hook.phtml
a app/design/adminhtml/default/default/template/pulsestorm_launcher/js-nav.phtml
a app/etc/modules/Pulsestorm_Launcher.xml
a skin/adminhtml/default/default/pulsestorm_launcher
a skin/adminhtml/default/default/pulsestorm_launcher/main.css
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher> tree
.
├── README.md
├── app
│ ├── code
│ │ └── community
│ │ └── Pulsestorm
│ │ └── Launcher
│ │ ├── Block
│ │ │ ├── Breadcrumbs.php
│ │ │ └── Page
│ │ │ └── Menu.php
│ │ ├── Helper
│ │ │ └── Data.php
│ │ ├── Model
│ │ │ ├── Links.php
│ │ │ └── Observer.php
│ │ ├── README.md
│ │ ├── controllers
│ │ │ └── Pulsestorm
│ │ │ └── LauncherController.php
│ │ └── etc
│ │ ├── adminhtml.xml
│ │ ├── config.xml
│ │ └── system.xml
│ ├── design
│ │ └── adminhtml
│ │ └── default
│ │ └── default
│ │ └── template
│ │ └── pulsestorm_launcher
│ │ ├── hook.phtml
│ │ └── js-nav.phtml
│ └── etc
│ └── modules
│ └── Pulsestorm_Launcher.xml
├── build_launcher.bash
├── magento-tar-to-connect.launcher.php
├── magento-tar-to-connect.phar
├── modman
├── skin
│ └── adminhtml
│ └── default
│ └── default
│ └── pulsestorm_launcher
│ └── main.css
└── var
├── build
│ └── Pulsestorm_Launcher.tar
└── package
28 directories, 20 files
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher> cat magento-tar-to-connect.launcher.php
<?php
return array(
'base_dir' => 'var/build',
'archive_files' => 'Pulsestorm_Launcher.tar',
'extension_name' => 'Pulsestorm_Launcher',
'extension_version' => '1.0.4',
'path_output' => 'var/package',
'stability' => 'stable',
'license' => 'MIT',
'channel' => 'community',
'summary' => 'Provides navigation shortcuts for the admin console\'s navigation and gloal search',
'description' => 'This extension provides Magento admin console users with an "application launcher". This application launcher provides instant access to the admin console\'s navigation, every system configuration search section, as well as the Magento global search. The Pulse Storm launcher is a free, open source, must have extension for anyone working with Magento. ',
'notes' => 'Typo fixes, properly aborts ajax requests.',
'author_name' => 'Alan Storm',
'author_user' => 'alanstorm',
'author_email' => '[email protected]',
'php_min' => '5.2.0',
'php_max' => '6.0.0',
'skip_version_compare' => false,
);
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher> ./magento-tar-to-connect.phar magento-tar-to-connect.launcher.php
x app/code/community/Pulsestorm/Launcher/
x app/code/community/Pulsestorm/Launcher/Block/
x app/code/community/Pulsestorm/Launcher/controllers/
x app/code/community/Pulsestorm/Launcher/etc/
x app/code/community/Pulsestorm/Launcher/Helper/
x app/code/community/Pulsestorm/Launcher/Model/
x app/code/community/Pulsestorm/Launcher/README.md
x app/code/community/Pulsestorm/Launcher/Model/Links.php
x app/code/community/Pulsestorm/Launcher/Model/Observer.php
x app/code/community/Pulsestorm/Launcher/Helper/Data.php
x app/code/community/Pulsestorm/Launcher/etc/adminhtml.xml
x app/code/community/Pulsestorm/Launcher/etc/config.xml
x app/code/community/Pulsestorm/Launcher/etc/system.xml
x app/code/community/Pulsestorm/Launcher/controllers/Pulsestorm/
x app/code/community/Pulsestorm/Launcher/controllers/Pulsestorm/LauncherController.php
x app/code/community/Pulsestorm/Launcher/Block/Breadcrumbs.php
x app/code/community/Pulsestorm/Launcher/Block/Page/
x app/code/community/Pulsestorm/Launcher/Block/Page/Menu.php
x app/design/adminhtml/default/default/template/pulsestorm_launcher/
x app/design/adminhtml/default/default/template/pulsestorm_launcher/hook.phtml
x app/design/adminhtml/default/default/template/pulsestorm_launcher/js-nav.phtml
x app/etc/modules/Pulsestorm_Launcher.xml
x skin/adminhtml/default/default/pulsestorm_launcher/
x skin/adminhtml/default/default/pulsestorm_launcher/main.css
^C
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher>
jmshelby@jbook:~/WSS/scratch/PulsestormLauncher> tree var
var
├── build
│ └── Pulsestorm_Launcher.tar
└── package
2 directories, 1 file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.