Skip to content

Instantly share code, notes, and snippets.

@balupton
Last active September 23, 2015 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balupton/632347 to your computer and use it in GitHub Desktop.
Save balupton/632347 to your computer and use it in GitHub Desktop.
Aloha Editor Plugin Migrator

Aloha Editor Plugin Migrator

Used to port over plugins to their new repos

<?php
$plugins = explode(' ','HighlightEditables GCN Format Link List Table Image Annotations');
$pwd = $_SERVER['PWD'];
foreach ( $plugins as $plugin ) {
$name = "Aloha-Plugin-$plugin";
$dir = "com.gentics.aloha.plugins.$plugin";
$path = "WebContent/plugins/$dir";
$repo = "git@github.com:alohaeditor/$name.git";
echo "Setting Up: $name
dir: $dir
path: $path
repo: $repo\n";
$commands = "
cd $pwd;
rm -Rf $name;
cp -Rp $pwd/Aloha-Editor $pwd/$name;
cd $pwd/$name;
git reset --hard;
git filter-branch --subdirectory-filter $path -- --all;
git remote rm origin ;
git remote add origin $repo ;
git push origin master ;
cd $pwd;
";
echo $commands;
system($commands);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment