Creating an Extension Release using git-archive

A place to discuss Extensions Development
Post Reply
User avatar
bonelifer
Administrator
Administrator
Posts: 477
Joined: 24 Jun 2006, 17:48
Real name: William
Location: htpc.MythBuntu

Creating an Extension Release using git-archive

Post by bonelifer »

When submitting an extension, some files in your repo may not need to be included in your release archive when submitting to the Customisation Database at phpBB.com. You may have files for running TravisCI or other things included. I've compiled a .gitattributes and a .gitignore file for the repos, based off some from one of RMcGirr83's extensions. I've added export-ignore entries in the .gitattributes file for files that don't need to be in the release archive. In the .gitignore file I've added the vendor folder since it doesn't need uploading at all. If you've already implemented the TravisCI/EPV testing from this post, TravisCI/EPV, then this will also exclude the files for TravisCI. The bash/batch files have comments explaining what is going on. You'll need to change GitExportDIR before running it. You'll also have to change vendor to your vendor/namespace, which is usually your phpBB.com username. For the bash file you'll also need to chmod +x git-release.sh. The files from git-dot-files.zip will need to be added/pushed to your git repo.

Using the git-release.sh\git-release.bat files is fairly straight forward. On the command-line(terminal) go to the directory for the git repo. Then run:

Linux:
git-release.sh exampleExtensionName

Windows:
git-release exampleExtensionName

Example:
git-release.sh holidayflare
git-release holidayflare


That will produce a zip file that contains the repo in this directory structure:
ext/vendor/exampleExtensionName

Example:
ext/phpbbmodders/holidayflare

The zip file will be named:
exampleExtensionName.zip

Example:
holidayflare.zip


git-release.zip
(769 Bytes) Downloaded 363 times

win-git-release.zip
(1.4 KiB) Downloaded 353 times

git-dot-files.zip
(866 Bytes) Downloaded 345 times
User avatar
bonelifer
Administrator
Administrator
Posts: 477
Joined: 24 Jun 2006, 17:48
Real name: William
Location: htpc.MythBuntu

Re: Creating an Extension Release using git-archive

Post by bonelifer »

Updated the git-release files to check to make sure:
1. that the user provides a releaseName
2. that the user is actually in a repo
Post Reply