Version 1

    Version 1.0.0 of the Jive Apps Command Line Tools introduces the LiveDev feature. This will boost your productivity by allowing you to develop apps and see the changes you are making happen in real time! No having to stop each time you save a file and go through the git add, commit, and push sequence.


    How LiveDev works:


    1. You run "jiveapps livedev" inside the app directory on your machine

    2. A livedev branch is created in the Git repo for your username - "livedev/scott.becker"

    3. The Jive Apps Sandbox is switched to point your app instance to the livedev branch

    4. A process monitors file changes in your local directory.

    5. All changes are automatically committed to the livedev branch and pushed to AppHosting.

    6. When you refresh your browser, the changes appear on the sandbox.


    When you are done with a LiveDev session, you can quit and squash all changes into one commit on the master branch.


    Here's how to use LiveDev:


    1. Update your JiveApps gem to the latest version


    $ sudo gem install jiveapps


    2. Navigate to the app's directory.


    $ cd foo_bar_app


    3. Start up LiveDev.


    $ jiveapps livedev

    === Starting LiveDev: foo_bar_app

    1/4: Checking out LiveDev branch livedev/scott.becker.

    2/4: Syncing local branch with remote server.

    3/4: Switching the Jive App Sandbox to point to LiveDev branch.

    4/4: Watching directory for changes. Leave this process running

         until you wish to quit LiveDev. Type "exit" to quit.

         To view your app while in LiveDev mode, go to:



    4. Leave the LiveDev process running in the terminal. Open the same app directory in your favorite editor, make a change to a file and save it. In this case, I modified app.xml.


    5. In the terminal window where LiveDev is running, you will see a log of changes:


      - [2011-04-04 15:11:35] LiveDev: modified ./canvas.html

      - [2011-04-04 15:11:55] LiveDev: modified ./canvas.html

      - [2011-04-04 15:12:28] LiveDev: modified ./javascripts/main.js

      - [2011-04-04 15:12:44] LiveDev: modified ./javascripts/main.js

      - [2011-04-04 15:12:57] LiveDev: modified ./javascripts/main.js

      - [2011-04-04 15:13:21] LiveDev: modified ./canvas.html

      - [2011-04-04 15:13:39] LiveDev: modified ./canvas.html

      - [2011-04-04 15:47:19] LiveDev: modified ./canvas.html

      - [2011-04-04 15:47:48] LiveDev: modified ./canvas.html

      - [2011-04-04 15:50:09] LiveDev: modified ./canvas.html

    Each time a change is made, it is committed to my LiveDev branch, "livedev/scott.becker" and pushed to the remote git repository on the Jive AppHosting server. A copy of the app is also published to the web at<the-app-name>/...


    You can continue to make changes, hit save, then refresh the browser window pointing to the Jive Apps Sandbox and see your changes in real time.


    6. When you are done making changes, you will want to make them permanent by committing them to the master branch. Quit LiveDev by typing "exit" followed by the [enter] key, and confirming that you really want to stop LiveDev:



    Would you like to quit LiveDev mode now? y/n?



    NOTE: Windows users using the Git Bash Shell should not stop LiveDev with CTRL-C, as this will exit the program immediately before it can shut down properly. Instead, type "exit" and hit [enter] to allow LiveDev to quit properly.


    7. At this point, LiveDev will stop and switch back to the master branch, pull in any remote changes to the master branch, then squash and stage all your LiveDev changes for you as one commit:


    === Stopping LiveDev: foo_bar_app

    1/3: Switching the Jive App Sandbox to point to master branch.

    2/3: Checking out master branch and pulling any remote changes.

    3/3: Merging changes from LiveDev branch without committing.


    8. You will be given instructions on how to keep the changes, or forget them.


    === You can now review your changes, then keep or forget them:

       1. Review your changes:

          $ git status

          $ git diff --cached

       2. Commit them to the master branch:

          $ git commit -m 'your commit message here'

          $ git push jiveapps master

          $ git branch -D livedev/scott.becker

       3. Or forget them:

          $ git reset --hard HEAD

          $ git branch -D livedev/scott.becker


    If any merge conflicts occur (due to others making changes), you'll be told about them and have an opportunity to fix them.


    9. In my case, I wish to make my changes permanent, so I follow the steps for "2. Commit them to the master branch"


    $ git commit -m 'Made a significant change to Foo Bar App'

    $ git push jiveapps master

    $ git branch -D livedev/scott.becker


    The last command deleted the livedev branch. If I chose to start livedev again, the branch will be recreated for me. I recommend stopping LiveDev and making a commit to the master branch each time you are finished with a significant change, then starting it back up and continuing. You don't want to get too far ahead of yourself and end up making massive changes all in one commit.


    We hope this helps you develop your apps in a faster, more convenient way and look forward to hearing your feedback about this feature!