Script for auto-switching Grails versions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Script for auto-switching Grails versions

Deluan Cotts Quintão
Hi there,

I have finally published my script for auto-switching Grails versions, based on project's application.properties:

http://github.com/deluan/grails.sh

It runs on Mac OS X, Linux and Windows+Cygwin

There is some documentation there, feedbacks are welcome!

Deluan.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

lucastex
cool!

Lucas Frare Teixeira .·.
- [hidden email]
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex


On Wed, Jul 14, 2010 at 12:10 AM, Deluan Cotts Quintão <[hidden email]> wrote:

Hi there,

I have finally published my script for auto-switching Grails versions, based
on project's application.properties:

http://github.com/deluan/grails.sh

It runs on Mac OS X, Linux and Windows+Cygwin

There is some documentation there, feedbacks are welcome!

Deluan.
--
View this message in context: http://grails.1312388.n4.nabble.com/Script-for-auto-switching-Grails-versions-tp2288269p2288269.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

Daniel Latorre
Great job! Very useful script for me :)

2010/7/14 Lucas F. A. Teixeira <[hidden email]>
cool!

Lucas Frare Teixeira .·.
- [hidden email]
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex



On Wed, Jul 14, 2010 at 12:10 AM, Deluan Cotts Quintão <[hidden email]> wrote:

Hi there,

I have finally published my script for auto-switching Grails versions, based
on project's application.properties:

http://github.com/deluan/grails.sh

It runs on Mac OS X, Linux and Windows+Cygwin

There is some documentation there, feedbacks are welcome!

Deluan.
--
View this message in context: http://grails.1312388.n4.nabble.com/Script-for-auto-switching-Grails-versions-tp2288269p2288269.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






--
Daniel Latorre
Co-founder: http://www.jobsket.com/
My CV: http://www.jobsket.es/cv/dani
My website: http://www.danilat.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

Gavin-15
In reply to this post by Deluan Cotts Quintão
Deluan Cotts Quintão wrote:
Hi there,

I have finally published my script for auto-switching Grails versions, based
on project's application.properties:

http://github.com/deluan/grails.sh

It runs on Mac OS X, Linux and Windows+Cygwin

There is some documentation there, feedbacks are welcome!

Deluan.
  
Thanks Deluan!

I also added an OPTS override (tested in Debian with Grails-1.1 through Grails-1.2.2):

+# Override OPTS.
+export GRAILS_OPTS=" "
+export JAVA_OPTS="-server -Xmx512m -XX:MaxPermSize=256m"

export GRAILS_HOME=${BASE_GRAILS_PATH}/grails-${VERSION}
GRAILS_CMD=${GRAILS_HOME}/bin/grails

if [ ! -x "$GRAILS_CMD" ]; then
        echo "Error: grails command not found at '$GRAILS_CMD'!"
        exit 3
fi

exec $GRAILS_CMD $*


--
www.gnumims.org
www.kromhouts.net
Everything in moderation, including moderation itself.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

sourceopen7
In reply to this post by Deluan Cotts Quintão
On Windows (cygwin) I find this error:

./grails: line 24: conditional binary operator expected
./grails: line 24: syntax error near `=~'
./grails: line 24: `if [[ $TRY_VERSION =~ [0-9]\.[0-9]\.[0-9] ]]; then'

Are you sure it is tested on Windows.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

Graeme Rocher
Administrator
Why don't you guys just use GVM? it is a more mature solution


On Mon, Apr 22, 2013 at 9:27 AM, sourceopen7 <[hidden email]> wrote:
On Windows (cygwin) I find this error:

./grails: line 24: conditional binary operator expected
./grails: line 24: syntax error near `=~'
./grails: line 24: `if [[ $TRY_VERSION =~ [0-9]\.[0-9]\.[0-9] ]]; then'

Are you sure it is tested on Windows.



--
View this message in context: http://grails.1312388.n4.nabble.com/Script-for-auto-switching-Grails-versions-tp2288269p4643839.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

sourceopen7
It may be mature and comprehensive, but its more work. Generally, all we require is to use an app. specific version of grails, on a machine that may have many apps on different grails releases. We cannot use one GRAILS_HOME.

But GVM requires one to use gvm use command, whereas it could simply pick the right version from application.properties. I think a script is simpler, less to manage and gets the job done.

What do you think?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

Jeff Scott Brown



On Sat, May 4, 2013 at 7:58 AM, sourceopen7 <[hidden email]> wrote:
It may be mature and comprehensive, but its more work. Generally, all we
require is to use an app. specific version of grails, on a machine that may
have many apps on different grails releases. We cannot use one GRAILS_HOME.

But GVM requires one to use gvm use command, whereas it could simply picrk
the right version from application.properties. I think a script is simpler,
less to manage and gets the job done.

What do you think?



If you use the Grails Wrapper (grailsw) you don't have to monkey with any of that.  Each project has its own wrapper script and that wrapper script is associated with a particular version of Grails.  No GRAILS_HOME is required and no environment modifications have to be made as you switch back and forth between projects which use different versions of Grails.

For many situations, the wrapper will be the simplest solution.



JSB

--
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

alxndrsn
On 4 May 2013 17:03, Jeff Brown <[hidden email]> wrote:
>> But GVM requires one to use gvm use command, whereas it could simply picrk
>> the right version from application.properties. I think a script is
>> simpler,
>> less to manage and gets the job done.
>>
>> What do you think?

Inclined to agree - grails.sh script works very well for me including
old versions of Grails.


> If you use the Grails Wrapper (grailsw) you don't have to monkey with any of
> that.  Each project has its own wrapper script and that wrapper script is
> associated with a particular version of Grails.  No GRAILS_HOME is required
> and no environment modifications have to be made as you switch back and
> forth between projects which use different versions of Grails.
>
> For many situations, the wrapper will be the simplest solution.

Interesting.  Does Wrapper work for older versions and do you need to
modify scripts which call `grails` directly?  Are there obvious
reasons to switch if already using grails.sh without problems?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

sourceopen7
Hello @alxndrsn

So, can you share the script for Windows? I'd appreciate. I do not seem to have a good working script for Windows. For Linux it works smoothly.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Script for auto-switching Grails versions

Fred Janon
In reply to this post by Jeff Scott Brown
Thanks Jeff, I didn't know about the Grails Wrapper, it didn't catch my attention in th docs, maybe the title could be changed to something catchier like: "Managing multiple versions of Grails on the same machine".

That's really good I was tired of keeping track of the versions of all my projects and changing the env variables.


Fred



On Sat, May 4, 2013 at 4:03 PM, Jeff Brown <[hidden email]> wrote:



On Sat, May 4, 2013 at 7:58 AM, sourceopen7 <[hidden email]> wrote:
It may be mature and comprehensive, but its more work. Generally, all we
require is to use an app. specific version of grails, on a machine that may
have many apps on different grails releases. We cannot use one GRAILS_HOME.

But GVM requires one to use gvm use command, whereas it could simply picrk

the right version from application.properties. I think a script is simpler,
less to manage and gets the job done.

What do you think?



If you use the Grails Wrapper (grailsw) you don't have to monkey with any of that.  Each project has its own wrapper script and that wrapper script is associated with a particular version of Grails.  No GRAILS_HOME is required and no environment modifications have to be made as you switch back and forth between projects which use different versions of Grails.

For many situations, the wrapper will be the simplest solution.



JSB

--
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

Loading...