Giter VIP home page Giter VIP logo

Comments (2)

hammerdr avatar hammerdr commented on July 3, 2024

I've been looking at how this might be implemented and wanted to share the different approaches.

The first approach is to just tack these options on to the current add_project script. This is the simplest solution to implement but introduces additional complexity to the add_project script that will only be related to SCM. For example, if we wanted to do some simple argument checking to inform a user that the :watch_for_changes_in switch won't work for them in SVN, we'd need to do a big if statement that branched on the SCM choice in add_project.

To dry that up, I tried dropping in Trollop instead of optsparse because it allows for git-style subcommands. The first issue with this is that the interface would need to change. Instead of cruise add [project_name] -r [repo] -s [scm] it would be cruise add [project_name] [scm] [scm_options] or cruise add [scm] [project_name] [scm_options]. This does not seem incredibly bad to me but it would change how we do some things.

Finally, the other option I was thinking about was to not touch the add_project command and to create an configure_project command that would allow the user to modify a project from the command line. I'm not sure what all of the implications of this are, especially after a project has been created and run a few times.

@bguthrie You got some guidance for this?

Code for the trollop method: #74

from cruisecontrol.rb.

bguthrie avatar bguthrie commented on July 3, 2024

I like the idea of switching to Trollop rather than extending the existing mess. I'm a little leery about going the subcommand route--are the different options really THAT different? If they are, then this seems like a reasonable way to do it, and a reasonable way to extend the cruise command to boot.

Obviously I can't merge the pull request without a bit more testing but I like where you're going.

You should be able to configure as well as add from the command line, but I don't think adding that in removes the need to improve the existing add command.

from cruisecontrol.rb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.