Managing multiple Grails versions in development
In Grails development, it's not uncommon to maintain several projects with different Grails versions.
It's a PITA to switch between Grails versions during development because it requires the GRAILS_HOME environment variable to be updated, to point to the correct Grails directory.
Rescue My Ass
I added 2 new bash commands to make my life easy:
- grls - list all available installed versions.
- gr
- set GRAILS_HOME to the specified version.
Beech-Forkers-MacBook:~ huiming$ grls
1.1.2
1.3.2
1.3.4
1.3.6
1.1.2
1.3.2
1.3.4
1.3.6
Beech-Forkers-MacBook:~ huiming$ gr 1.3.2
Beech-Forkers-MacBook:~ huiming$ grails
Beech-Forkers-MacBook:~ huiming$ grails
Welcome to Grails 1.3.2 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /Users/huiming/work/tools/grails
Licensed under Apache Standard License 2.0
Grails home is set to: /Users/huiming/work/tools/grails
How I Implemented It
First, I keep all Grails installations under a same directory:
Beech-Forkers-MacBook:~ huiming$ ls -d1 work/tools/grails-*
work/tools/grails-1.1.2
work/tools/grails-1.3.2
work/tools/grails-1.3.4
work/tools/grails-1.3.6
Then, add the commands into my ~/.profile file:
work/tools/grails-1.1.2
work/tools/grails-1.3.2
work/tools/grails-1.3.4
work/tools/grails-1.3.6
Then, add the commands into my ~/.profile file:
TOOLS=~/work/tools
function gr {
rm -f $TOOLS/grails && \
ln -s $TOOLS/grails-$1 $TOOLS/grails
}
}
alias grls="ls -d $TOOLS/grails-* | xargs basename | sed 's/grails-//g'"
export GRAILS_HOME=$TOOLS/grails
1 comments:
Perhaps most necessary of all, solely play at licensed on line casino websites, guarantee that|to ensure that} video games are truthful, payouts are independently audited and that you're 카지노 사이트 completely protected and guarded as you play. In an actual on line casino the place gamers spin the reels in hopes of profitable the bet line. But free slots are nice way|a good way|an effective way} to apply the sport without spending any money.
Post a Comment