Samstag, 3. September 2016

OracleJet - What should be committed to the Version Control

Introduction

OracleJet YeoMan Generator: version 1.1
OracleJet: version 2.1.0

I did create my hybrid android application with the following command and it created tons of files, that I didn't want to commit to my version control system. Although the YeoMan Generator is also producing a .gitignore file, I didn't really like that one, because it still asked me to commit files, that also can be generated.

$ yo oraclejet:hybrid tekkiduell --appName="Tekki Duell 4.0" --template=navdrawer --platforms=android



My adjustments to .gitignore

Here is my .gitignore containing the adjustments I did do to the original .gitignore from Oracle.

bower_components
!hybrid
hybrid/*
!hybrid/config.xml
!hybrid/res
nbproject/private
node_modules
src/js/libs
themes

What did I add to the ignore list
  • hybrid/plugins/fetch.json - doesn't has to be checked in. Is being generated.
  • nbproject/private - doesn't has to be checked in. It contains only personal NetBeans settings. Anyways, don't forget to commit the nbproject folder.


What has to be done after checking out

After you are done with the adjustments to .gitignore, please commit the files to your repository and checkout the complete repository to another directory to check, if everything is working as expected.

After checking out call the following three commands in the root folder of your project. Now you should have all the needed libs and modules again.
$ npm install
$ bower install
$ grunt bowercopy
$ grunt build --platform=android