# Nixenvironment Nixenvironment installs, updates and manages inner NIX environment stuff to make build and deploy for NIX projects, etc. ## Installation $ [sudo] gem install nixenvironment ## Usage COMMANDS: build # Build project for selected configuration and make signed/resigned ipa clean # Remove temp files and clean all targets for xcode project clean_working_copy # Make working copy clean code_coverage # Generate xctest unit tests code coverage report code_duplication_report # Generate code duplication report deploy # Deploy built artifacts to given server help # Display global or [command] help documentation svn_tag_from_jenkins # Make tag by finding the first credential in local credential storage tag # Make SVN/git/mercurial tag, SCM_USERNAME and SCM_PASSWORD must be defined on calling this target test # Build xctest unit tests and run them in simulator GLOBAL OPTIONS: -h, --help Display help documentation. Default command -v, --version Display version information -t, --trace Display backtrace when an error occurs # Options to override default Config --project_to_build VALUE --project_target_to_build VALUE --project_target_to_test VALUE --workspace_to_build VALUE --workspace_scheme_to_build VALUE --workspace_scheme_to_test VALUE --sdk VALUE --sdk_for_tests VALUE --exclude_pattern_for_code_coverage VALUE --exclude_pattern_for_code_duplication VALUE --deploy_host VALUE --deploy_path VALUE --deploy_username VALUE --deploy_password VALUE --icons_path VALUE --xctest_destination_device VALUE --configuration_files_path VALUE --code_coverage_configuration VALUE --code_coverage_output_directory VALUE --env_var_prefix VALUE --infoplist_path VALUE EXAMPLES: nixenvironment [-h] nixenvironment build # Make Debug build and create .ipa file from last built app product by default nixenvironment build --config Release --ipa resigned_ipa_for_device nixenvironment deploy ... ## TODO: 1. Rework legacy scripts 2. Update utils, rework if possible 3. Move Unity build logic to separate gem and add it via dependencies 4. Rewrite this README ## Automatic install and update on CI (Jenkins): Add lines below to Sudoers in Mac OS X system: jenkins ALL=(ALL) NOPASSWD: /usr/bin/bundle jenkins ALL=(ALL) NOPASSWD: /usr/bin/gem Read http://osxdaily.com/2014/02/06/add-user-sudoers-file-mac/ and http://stackoverflow.com/questions/12736351/exit-save-edit-to-sudoers-file-putty-ssh to know how to do it correctly. Then run this in Execute shell: # See credentials for deploy on https://qwiki.nixsolutions.com/display/IPT/Credentials ./gemify.sh && bundle update && sudo gem install nixenvironment --verbose