Developer Tools

Developer Tools 1.4.3

No permission to download

TickTackk

Well-known member
batpool52! submitted a new resource:

Developer Tools - Developer tools for XenForo 2

Screenshots
View attachment 167945View attachment 167946View attachment 167947View attachment 167948

Features
  • Display order next to option group under Setup > Options
  • Display order next to permission interface title and permission
  • Developer Options under drop down menu for every add-on allows you to specify what the contents of LICENSE, .gitignore and README.md file should be
  • Upon running CLI command...

Read more about this resource...
 
Upon running CLI command xf-addon:build-release [addon_id] a new directory is added into the add-on directory named "_repo" which can be used for VCS (Version Control System)
Could you explain in more detail what exactly this means?


Fillip
 
Could you explain in more detail what exactly this means?


Fillip
When you run the command xf-addon:build-release [addon_id] a new directory is added named "_repo" under the root of your add-on you ran the build-release command for. Which includes the README.md file in the _repo directory, LICENSE and .gitignore in the add-on root directory as well as all the add-on files.

This is what the repo directory structure would look like for my developer tools add-on
  • _repo
    • upload
      • src
        • addons
          • TickTackk
            • DeveloperTools
              • .gitignore
              • LICENSE
              • [all your add-on files]
    • README.md
The goal was to create shareable package that can be just downloaded and moved into the xenforo installation without the need browsing through src\addons directory as well as to make things look more organised.

Sorry for explaining right, English isn't my first language and for late response. If you got any more questions feel free to ask.
 
When you run the command xf-addon:build-release [addon_id] a new directory is added named "_repo" under the root of your add-on you ran the build-release command for. Which includes the README.md file in the _repo directory, LICENSE and .gitignore in the add-on root directory as well as all the add-on files.
That is very interesting indeed, thank you for the explanation :)

The only issue I can see with this is that (especially during initial development) it can take a long time between each release being ready, and in an ideal world, you should commit your changes to VCS as soon as each feature you're working on has been finished (for backup purposes).
If you're working in a team, your VCS structure would (probably) look even more complex, with each feature having its own branch before being merged back into the master branch.

That being said, your feature is still very useful :) I believe it could be made even more useful with a few changes:
  • Add a new CLI command, something like ticktakk-developertools:vcs-export [addon_id] (or however 3rd party CLI commands end up looking, I forget) which would do a few things:
    • Run the xf-addon:export [addon_id] command to get the latest XML files
    • Run the xf-dev:entity-class-properties [addon_id] command, because everyone likes properly type hinted entities :)
    • Copy the code into the _repo folder, same as building a release
    • Run the actions from build.json on the files in the _repo folder, same as building a release
    • Optional: In build.json, allow us to specify a path to git. If a path is specified, this tool would automatically commit & push to the current tracking branch after everything else is done
  • Add a new entry in the AdminCP add-on drop-down to trigger a cron job that does the above
    • You would want to separate each of the above steps into its own step in the cron job, to avoid timeouts
With this feature you would significantly cut down on the amount of repetition we would need to do in order to properly back up our work :)


Fillip
 
  • Run the xf-addon:export [addon_id] command to get the latest XML files

FWIW it's probably beneficial to .gitignore the _data directories, there is no real benefit to them being in your repository, and (for us at least) they've just caused more headache than they're worth :)
 
FWIW it's probably beneficial to .gitignore the _data directories, there is no real benefit to them being in your repository, and (for us at least) they've just caused more headache than they're worth :)
Considering I don't build my releases using XF's own build-release tool (due to the fact that each individual customer downloads slightly different files), they're sort of required :D


Fillip
 
batpool52! updated Developer Tools with a new update entry:

1.0.0 Alpha 2

New:
  • Added new command ticktackk-devtools:better-export [addon_id] which would run both xf-addon:export and xf-dev:entity-class-properties for the add-on id provided
  • Added support for testing template modifications against different style

Changes:
  • Updated description under addon.json

Bug Fixes:
  • Fixed Setup file

Read the rest of this update entry...
 
batpool52! updated Developer Tools with a new update entry:

v1.0.0 Alpha 3

New:
  • Added option --release for ticktackk-devtools:better-export which would release the add-on

Changes:
  • README.me location is now under add-on directory to avoid getting overwritten by other releases made from developer tools
  • Removed template modification which wasn't required for anything
  • xf-dev:export command will be called after xf-dev:entity-class-properties

Bug Fixes:
  • ...

Read the rest of this update entry...
 
batpool52! updated Developer Tools with a new update entry:

v1.0.0 Alpha 4

New:
  • Upon developer output for supported output types git commit command is called with supported commit type
  • Supported developer output types
    • Admin Navigation
    • Admin Permission
    • Advertising Position
    • BB Code
    • BB Code Media Site
    • Class Extension
    • Content type filed
    • Cron entry
    • Help page
    • Navigation
    • Option
    • Option Group
    • Permission
    • Permission Interface Group
    • Phrase
    • Route
    • Style Property
    • Style Property Group
    • Template...

Read the rest of this update entry...
 
batpool52! updated Developer Tools with a new update entry:

1.0.0 Alpha 6

New:
  • Copy additional files to repository directory
  • Add "Save and exit" button for template modification editing process
  • LICENSE is now LICENSE.md
  • Both LICENSE.md and README.md are now copied to root directory
  • Both LICENSE.md and README.md is now added to add-on archive as well
  • New CLI commands ticktackk-devtools:git-init and ticktackk-devtools:git-commit
Changes:
  • Removed commit upon any developer output...

Read the rest of this update entry...
 
Unfortunately the git portions don't work.

This is my git config file:
Code:
[user]
    name = Fillip Hannisdal
    email = fillip@dragonbyte-tech.com

And this is my git config file after running ticktackk-devtools:better-export <addon> --commit

Code:
[user]
    name = Fillip Hannisdal
    email = fillip@dragonbyte-tech.com
    name =
    email =


Fillip
 
I put up a few pull requests to fix a few bugs and add some new features :)

Shortlist:
  • Re-added additional_files support, which was removed for some reason
  • Configurable exclude_dir support, which is needed because I don't want _output directory in my repo but I need _data
  • Minor performance improvement for writing gitignore
  • git push support

Fillip
 
batpool52! updated Developer Tools with a new update entry:

v1.0.0 Beta 1

New:
  • Added new CLI command ticktackk-devtools:git-push <add-on id> <repo> <branch> (thanks to @DragonByte Tech )
  • New options for ticktackk-devtools:better-export
    • --skip-export Allows skipping exporting data before building release or moving files to _repo directory (thanks to @DragonByte Tech )
    • --commit Allows committing changes (if any) to the local repository...

Read the rest of this update entry...
 
batpool52! updated Developer Tools with a new update entry:

New features, Changes and small bugfix

What happen to 1.0.0 Beta 2?
I have no idea...

New
  • PHPUnit framework integration allows you to test add-on before releasing or pushing the new changes to VCS
  • Add-on specific git configuration (currently only name and email supported)
  • Ability to use packages made using composer without composer itself for your add-ons
  • Added new CLI commands ticktackk-devtools:phpunit and...

Read the rest of this update entry...
 
I've open sourced my installer utilities, which have a couple of advanced finder manipulation bits in them :)

The addOrChangeColumn was the original as it allows the same code-path to handle a table create/alter combo, which makes writing installer/upgrade code easier. I then setup my installers like this which has a similar install/upgrade/uninstall stanza.
 
Top Bottom