Skip to content

spember/Grails-Switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Grails Switcher

Grails has frequent, active updates... faster, usually, then teams that are using the framework can safely upgrade to. If you work on several different Grails projects, it can be cumbersome switching your 'GRAILS_HOME' around to the appropriate version. Sure, many IDEs can handle the version for you if you run within the app, but if you're like me, you prefer running from the command line. I've been doing this by hand for a while now, but with the frequent 2.0 release candidates, I've worked up a little app to help me along.

Thus, the purpose of this application is to provide a quick method for switching and managing your Grails versions.

You can use gswitch to install Grails versions and switch between your active installation. Additionally, if executed in a Grails Application root folder using the -a switch, the script will set your current Grails Version to match.

Requirements

  • Groovy version 1.x
  • Developed and tested on Mac OS X (Lion), thus it may work on *nix systems, but not on Windows

Installation

  • Export the repo such that the 'gswitch' script is somewhere in your PATH, and mark it as executable.
  • Set GRAILS_HOME to be "~/.gswitch/grails" and add $GRAILS_HOME/bin to your path. The reason for this is that gswitch will create a hidden folder in your home called '.gswitch' and use a symlink to specify the current Grails version.

Usage

To install a new version of Grails:

gswitch --install <version>

e.g.:

gswitch --install 2.0.0

Once installed, you can set the current version by:

gswitch <version>

And can list the currently installed versions by typing:

gswitch --versions

Furthermore, if in an Grails Application root folder, you can automatically set the active Grails Version by calling:

gswitch -a

Or just simply:

gswitch

About

Small Groovy app to switch your current Grails version via a command line app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages