1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    10
    Vote Rating
    0
    afromogli is on a distinguished road

      0  

    Default Best practices for 2.1.x to 2.2 beta migration

    Best practices for 2.1.x to 2.2 beta migration


    Hi folks!

    I have a question regarding migration from one minor release to another. Currently I have an Sencha Touch app which is setup using Sencha Touch 2.1. However I want to use the 2.2 beta since Windows Phone 8 support is desired.

    How do I perform the migration in the best way? Is there any Sencha CMD command I can run to upgrade or should I just manually copy the files? If I have to copy manually, which files must be upgraded?

    Thanks,
    Aram

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Should be able to do:

    Code:
    sencha app upgrade /path/to/touch-2.2.0
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Posts
    10
    Vote Rating
    0
    afromogli is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Should be able to do:

    Code:
    sencha app upgrade /path/to/touch-2.2.0
    Tried it, it worked! Thanks

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Posts
    404
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default


    does sencha app upgrade does goes over the app code and changes stuff? for example changes to custom components? or does it just change the library along with some other 'references'.
    can you please elaborate? (the docs does not explain this)
    thanks.

  5. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It won't go over all your code, it will do things like update the .sencha and touch directories. It'll also go over the index.html and app.js files and if they are changed then it will try to merge the files which can look bad when merged (we have a feature request to handle it better).
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    from my experiences an upgrade will/may change/replace:
    • index.html
    • app.js
    • app.scss
    • packager.json
    • resources/icons
    • resources/loading
    • resources/startup
    replacing the resources is an older problem.

    so make sure you have a backup of your stuff before you upgrade...

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    39
    Vote Rating
    1
    P.verbrugge is on a distinguished road

      0  

    Default


    I tried to upgrade using the given command, but it fails on CMD v.3.1.1.274.

    I have a Sencha Touch 2.1 app that I want to upgrade to 2.2. However, when I execute the command i get the following:
    - [INF] Loading configuration for framework directory ...
    - [ERR] null

    Path to my touch 2.2 folder is correct.

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    I wouldn't invest too much time into this. Upgrading a ST app is a continuous source of trouble. What I usually try to do is the following:
    • rename your project (f.e. from MyProject to MyProjectSave)
    • use CMD to create a new project, name = MyProject
    • copy all your stuff from save into the new project like app folder (remove it first), app.js, resources and css (if applicable), etc.
    • then try to run the app and adjust what's still missing.
    Note, that app.js has a slightly different structure (header) now. So it's better to copy YOUR part from the saved app.js into the new one.

  9. #9
    Sencha User
    Join Date
    Apr 2012
    Posts
    39
    Vote Rating
    1
    P.verbrugge is on a distinguished road

      0  

    Default


    Thanks for the tip. I will look into that. Somehow the upgrade never seems to work normally. :-(

  10. #10
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by P.verbrugge View Post
    ... Somehow the upgrade never seems to work normally. :-(
    my thoughts!