MovingBlocks
Groovy: Add remote setting functionality to "get" command
Earlier this year, we developed a Groovy wrapper for adding nice utility commands in Groovy
Your task is to extend the groovyw module get command to allow users to add specific git remotes in addition to just the default "origin". You should extend the module get command in the following way:
groovyw module get MyModuleclones "github.com/Terasology/MyModule.git" (unchanged from the current default behavior)groovyw module get MyUser/MyModuleclones Terasology/MyModule and adds a git remote called "MyUser" that points to "MyUser/Module" (scan for the/to detect this scenario)groovyw module get Module1 Module2 Module3 -remote MyUserclones Terasology/Module1 2 and 3 and adds remotes called "MyUser" which points to "github.com/MyUser/Module1" 2 and 3
Examples:
groovyw module get MyUser/Sampleclones Terasology/Sample and adds a git remote called "MyUser" that points to "MyUser/Sample"groovyw module get Sample CakeLie -remote MyUserclones Terasology/Sample and Terasology/CakeLie and adds a remote for each called MyUser pointing to the repos under https://github.com/MyUser
Definition of "Done"
- You have created a PR to the Terasology repo that adds the required functionality.
- Bonus: Also enable user input if you want to type in the remote (
groovyw module get Sample -remotewould act likegroovyw module getand ask the user for the parameter)
Where to start
- Take a look at other Groovy commands in the module.groovy file to get a feel for how Groovy works.
Task tags
Students who completed this task
Arpit Kamboj