# How to upgrade to a new SMILE version?

PREREQUISITE

  1. cd to installs folder & run install-smile.sh with the new version, ex: 4.2.1


     













    @$:~>cd installs/
    @$:~/installs>./install-smile.sh 4.2.1
    Downloading smile-4.2.1
    ...
    Downloaded successfully from https://bitbucket.org/metastay/repo/downloads/smile-4.2.1.zip
    unzipping the downloaded file
    ----  SMILE UPGRADED SUCCESSFULLY  ----
    ###  Note : Restart eclipse .
    Smile Version - 4.2.1
    To create a new project : "smile  new <project-name>"
    To create a new lib : "smile  create-lib <lib-name>"
    To export lib : "smile  export-lib"
    To request a license : "smile  request-license"
    To reset the project : "smile  spile"
    
  2. cd to project folder, enter into sbt shell


     




    @$:~>cd training/lottery/
    @$:~/training/lottery>sbt
    [info] Loading global plugins ...
    ...
    [error] Smile version mismatch(4.2.1) : Project Smile version: 4.2.0. Either run 'steps-to-update-smile' to follow the steps to update the project to current smile version OR run 'one-step-smile-upgrade' to do it automatically or  Exit!
    
  3. If the version upgrade is straight-foward with no specific upgrade-instructions run command one-step-smile-upgrade

     







    [Lottery] $ one-step-smile-upgrade
    [info] project smile version is updated from 4.2.0 to 4.2.1
    [info] smile build
    [info] updating modules ...
    [info] reloading ...
    ....
    [Lottery] $
    
  4. To manually upgrade, run command steps-to-update-smile

     













    [Lottery] $ steps-to-update-smile
    [info]
    [info] 1. run 'update-to-current-smile-version'"
    [info] 2. run 'smile'
    [info]
    [Lottery] $ update-to-current-smile-version
    [info] project smile version is updated from 4.2.0 to 4.2.1
    [Lottery] $ smile
    [info] smile build
    [info] updating modules ...
    [info] reloading ...
    [info] ...
    [Lottery] $
    

    these steps could vary based on the project complexity, for example: there would be instructions to add/remove components/ libraries etc.