Created
July 4, 2017 10:22
-
-
Save madsleejensen/b4f428de6e49ff905a6b8067a407bf34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format_version: '3' | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
project_type: fastlane | |
app: | |
envs: | |
- FASTLANE_XCODE_LIST_TIMEOUT: '120' | |
- SOURCE_DIR: $BITRISE_SOURCE_DIR | |
- MOBILE_DIR: $BITRISE_SOURCE_DIR/mobile | |
- MOBILE_BUILD_DIR: $BITRISE_SOURCE_DIR/mobile/build/ | |
- MOBILE_IOS_DIR: $BITRISE_SOURCE_DIR/mobile/ios | |
- CONNECTEDCARS_RELEASE_STORE_FILE: $BITRISE_SOURCE_DIR/mobile/android/connectedcars.keystore | |
workflows: | |
_setup_bitrise_environment: | |
steps: | |
- [email protected]: | |
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' | |
- [email protected]: {} | |
- [email protected]: | |
title: 'determine if build should be skipped' | |
inputs: | |
- content: |- | |
#!/bin/bash | |
if [ $(git diff --name-only HEAD~1 | grep -c "mobile/") -eq 0 ] | |
then | |
echo "" | |
envman add --key SHOULD_RUN_BUILD --value "false" | |
else | |
envman add --key SHOULD_RUN_BUILD --value "true" | |
fi | |
_setup_common_dependencies: | |
steps: | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- path: $MOBILE_DIR | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- version: 2.0.1 | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- path: $SOURCE_DIR | |
_setup_dockertoolbox: | |
steps: | |
- [email protected]: | |
title: install docker-toolbox + virtualbox | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- content: |- | |
#!/bin/bash | |
set -ex | |
brew cask install virtualbox | |
brew cask install docker-toolbox | |
- [email protected]: | |
title: 'docker-machine create default' | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- content: docker-machine create default | |
_generate_translation_files_unix: | |
steps: | |
- [email protected]: | |
title: 'generate translation files' | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- working_dir: $SOURCE_DIR | |
- content: docker run --workdir /app -v $SOURCE_DIR/web:/app -v $SOURCE_DIR/mobile:/app/mobile node:8.1.2 bash -c "curl https://connectedcars.dk/rawtranslations | node generatetranslationfiles.js" | |
_generate_translation_files_osx: | |
steps: | |
- [email protected]: | |
title: 'generate translation files' | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- working_dir: $SOURCE_DIR | |
- content: |- | |
#!/bin/bash | |
set -ex | |
eval $(docker-machine env default) | |
docker run --workdir /app -v $SOURCE_DIR/web:/app -v $SOURCE_DIR/mobile:/app/mobile node:8.1.2 bash -c "curl https://connectedcars.dk/rawtranslations | node generatetranslationfiles.js" | |
_store_build_artifacts: | |
steps: | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- deploy_path: $MOBILE_BUILD_DIR | |
- is_compress: 'true' | |
android: | |
before_run: | |
- _setup_bitrise_environment | |
- _setup_common_dependencies | |
- _generate_translation_files_unix | |
steps: | |
- [email protected]: | |
inputs: | |
- source: $BITRISEIO_ANDROID_RELEASE_KEYSTORE_URL | |
- destination: $CONNECTEDCARS_RELEASE_STORE_FILE | |
- [email protected]: | |
inputs: | |
- path: $MOBILE_DIR | |
- [email protected]: | |
inputs: | |
- lane: android build_release variant:Volkswagen | |
after_run: | |
- _store_build_artifacts | |
ios: | |
before_run: | |
- _setup_bitrise_environment | |
- _setup_common_dependencies | |
- _setup_dockertoolbox | |
- _generate_translation_files_osx | |
steps: | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- path: $MOBILE_IOS_DIR | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- github_access_token: $GITHUB_ACCESS_TOKEN | |
- carthage_command: bootstrap | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- path: $MOBILE_DIR | |
- [email protected]: | |
run_if: '{{getenv "SHOULD_RUN_BUILD" | ne "false"}}' | |
inputs: | |
- lane: ios build_release variant:Volkswagen | |
after_run: | |
- _store_build_artifacts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment