mwersch
mwersch

Reputation: 115

Is there a script to upgrade Grails 3.1.x apps to latest 3.1 version?

Is there a recommended process, script, or reference for upgrading Grails 3.1 apps to the latest maintenance release version?

Currently upgrading from 3.1.3 to 3.1.8 and there are some dependency updates (e.g. asset-pipeline) that are not mentioned in the release notes (https://github.com/grails/grails-core/releases). I only found them by comparing configs from a sample create-app run.

Upvotes: 0

Views: 46

Answers (2)

mwersch
mwersch

Reputation: 115

Stumbled across this handy repo to automate the app comparison process https://github.com/erichelgeson/grails-versions

Upvotes: 0

fcnorman
fcnorman

Reputation: 1186

This process has worked for me:

First, download the new grails to your machine. I usually download the tar.gz to /usr/local, gunzip, tar xvf, to /usr/local/grails-3.1.8 or whatever.

Second, add this to your .bash_profile:

GRAILS_HOME=/usr/local/grails-3.1.8
export GRAILS_HOME=$GRAILS_HOME

PATH=$PATH:$GRAILS_HOME/bin
export PATH=$PATH

Third:

source .bash_profile

Fourth, go to your projects directory, and:

grails create-app test-3.1.8

cd test-3.1.8

nano build.gradle

Here, you will see the new dependency version numbers that are required for your new version, in this case 3.1.8. (As I write, 3.1.9 is out.)

Now, go back to your old project's build.gradle and update the dependency version numbers to match.

Upvotes: 0

Related Questions