Akeebalize Your Extensions

250 views

Published on

Are you a developer? How much time do you waste packaging your extensions, uploading them to your website, creating change logs, creating new releases, making announcements, etc? A lot! Sometimes it can even be a deterrent to new releases because it's so much work. Akeeba to the rescue! Akeeba has some great extensions (all with free versions!!) made for developers by one of the most well known Joomla extension developer. With a little shell script magic (disclaimer; nix/mac based script), Git, Akeeba Subscriptions, Akeeba Release System, and Akeeba Release Maker, I'll show you how you can handle all of the above with a single command.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
250
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Painful to zip up your extension, upload it to your server, review your revision commit log, creating a change log, adding the release info to your site, etc.
  • Akeeba Subscriptions is optional. I use it to manage my commercial extensions. If you do not want to use a subscription system, then you can just totally ignore subscription related items.
  • My intention is not to sell Akeeba products. Why? Because you can’t buy them; they’re free! Nicholas has very graciously made his great products available to the Joomla! community for free and I’ve taken advantage of them as one possible solution. There may be many solutions out there but this is what I’ve found to work for me and hope to share that with you. You ultimately have to make the decision if these Akeeba products will work for you.
  • I’m not going into how to install Git, the Akeeba products, Cgwin, Joomla! etc. I’m assuming that as developers, we all have the skill level to figure these things out by utilizing Google or Nicholas’ amazing documentation to get things setup.
  • Okay, so now we are going to get into the nuts and bolts of the setup I’m demonstrating.
  • Akeeba Release Maker has been written specifically for creating releases for Akeeba’s packaging model where they provide a “core” or free version and a “pro” or commercial version. You can do the same if you want. I’m not, as I just have a single package for each extension. You can ignore the “core” and “pro” prefixes as we dig into the config file rather think of them as “package 1” and “package 2” for the specific extension. If you do don’t have to types of packages, then just use one or the other prefix.
    You’ll want to download the zip or checkout the files from Github and extract or put them in a location accessible across all your extensions.
  • I’m not a bash script expert! You may be a bash guru and look at my code and think what the frack!? But, it works and if you want to improve it, feel free to share :-)
  • Note the script 3rd party commands.
  • Akeebalize Your Extensions

    1. 1. Akeebalize Your Extensions how to quickly deploy releases
    2. 2. Why this Topic? one developer’s approach to streamline a tedious process
    3. 3. Tools • Akeeba Subscriptions (Optional) - http://akeebabackup.com • Akeeba Release System • Akeeba Release Maker https://github.com/akeeba/releasemaker • Git - http://github.com • Custom shell script https://github.com/devkardia/jdayhou13
    4. 4. Not a Plug …okay so maybe it is a plug
    5. 5. Prerequisites • Developer background • Basic understanding of Git • PHP 5.3+ Joomla! site (Akeeba minimum requirement) • Basic understanding of Akeeba Subscriptions, Akeeba Release System, and Akeeba Release Maker • *nix based OS • Any batch experts are welcome to convert the shell script! May be able to use Cygwin for Windows (http:// cygwin.com); but likely to be a bit of work to get all setup.
    6. 6. Nuts and Bolts let’s get started
    7. 7. Directory Structure preparing the directory structure for the bash script
    8. 8. Releases where does XYZ come from
    9. 9. Releases Category config.json -> common.category where does XYZ come from
    10. 10. Releases Category config.json -> common.category Description DESCRIPTION.html where does XYZ come from
    11. 11. Releases Category config.json -> common.category Description DESCRIPTION.html Notes RELEASENOTES.html + CHANGELOG (parsed) where does XYZ come from
    12. 12. Releases Category config.json -> common.category Description DESCRIPTION.html Notes Alias RELEASENOTES.html + CHANGELOG (parsed) config.json -> common.version where does XYZ come from
    13. 13. Releases Category config.json -> common.category Description DESCRIPTION.html RELEASENOTES.html + CHANGELOG (parsed) config.json -> common.version Notes Alias Maturity Last part of configured version: a = alpha, b = beta, rc = release candidate, otherwise stable. 1.0.0a where does XYZ come from
    14. 14. Items where does XYZ come from
    15. 15. Items Category, Name, Description, Environments Automatic item descriptions where does XYZ come from
    16. 16. Items Category, Name, Description, Environments Automatic item descriptions Akeeba Subscription Groups config.json -> $prefix.groups (separated by commas) where does XYZ come from
    17. 17. Items Category, Name, Description, Environments Automatic item descriptions Akeeba Subscription Groups config.json -> $prefix.groups (separated by commas) Access config.json -> $prefix.access (separated by commas) where does XYZ come from
    18. 18. Setting up Akeeba Subscriptions live demonstration
    19. 19. Key Point Summary • Take note of the subscription’s ID as this is used in ARM’s config.json file.
    20. 20. Setting up Akeeba Release System live demonstration
    21. 21. Key Point Summary • Automatic item descriptions • Package name pattern must match the format of the filename in order for the elements to be applied. • Use a wildcard ( * ) to accomodate filename differences.
    22. 22. Akeeba Release Maker https://github.com/akeeba/releasemaker
    23. 23. ARM Configuration • Copy the config.json file from within your ARM directory into the root of the extension’s tools directory.
    24. 24. Config.json Common Variables common.version Release version (set by shell script) common.arsapiurl URL to Joomla site common.username User with admin privileges to ARS common.password User with admin privileges to ARS common.category ARS Category ID common.releasedir Full file path to packages common.repodir Full file path to extension’s root common.update.method ftp or s3 common.update.ftp* FTP settings common.update.s3.* S3 settings
    25. 25. Config.json Pro/Core Variables *.pattern *.groups *.access *.update.* *.method *.ftp.* *.s3.* Package file pattern (use asterisks wildcard) Akeeba Subscription levels separated by a comma Joomla access level (ID of Guest, Public, Registered, Special, etc.) Update stream to be captured and created in another location. Means to create offsite update stream file FTP settings for creating offsite update stream file S3 settings for creating offsite update stream file
    26. 26. Config.json PDF Variables pdf.where core or pro; sets which prefix should PDF documents be associated with pdf.files Full file path to the extension’s PDFs. ARM will zip them and upload them as a new item under the new release.
    27. 27. releasemaker.sh the script that glues it all together
    28. 28. Script Usage ./releasemaker.sh command Command Options: packit package type Package Type Options: developer - Creates a package with a version based on repository revision; if the package already exists, a WORKING package will be created so as to not overwrite your dev packages. Multiple files stored in tools/packages/developer release version - Creates a package ready for release. Single file stored in /tools/packages/release. Only one zip is created since ARM will upload all zip files it finds. Version Options 1.0.0.a/b/rc - a = alpha; b = beta; rc = release candidate and anything else = stable releaseit - Invokes ARM to create new release on your site
    29. 29. https://github.com/devkardia/jdayhou13
    30. 30. https://github.com/devkardia/jdayhou13
    31. 31. https://github.com/devkardia/jdayhou13
    32. 32. https://github.com/devkardia/jdayhou13
    33. 33. https://github.com/devkardia/jdayhou13
    34. 34. Script Demonstration

    ×