Skip to content

Instantly share code, notes, and snippets.

@timers-ios
Last active February 16, 2021 06:57
Show Gist options
  • Save timers-ios/b0e0437e2fbf4580cb57158ff2b4b946 to your computer and use it in GitHub Desktop.
Save timers-ios/b0e0437e2fbf4580cb57158ff2b4b946 to your computer and use it in GitHub Desktop.
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: XXXX.xcworkspace
opts:
is_expand: false
- BITRISE_SCHEME: XXXX.xcworkspace
opts:
is_expand: false
- opts:
is_expand: false
XCPRETTY_JSON_FILE_OUTPUT: build_results.json
- opts:
is_expand: false
DEV_PLIST_PATH: XXXX/Info.plist
workflows:
Danger:
steps:
- activate-ssh-key: {}
- git-clone: {}
- script:
inputs:
- content: |
#!/bin/bash
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4
defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
title: xcodebuild configuration
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
set -x
# write your script here
git log --oneline | wc -l | tr -cd '0123456789' | envman add --key CUSTOM_BUILD_NUMBER
title: Get build version
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
#cspell
npm install -g cspell
bundle install
title: Installs
- cache-pull: {}
- carthage:
inputs:
- carthage_options: "--platform ios --use-ssh --new-resolver"
- cocoapods-install: {}
- set-xcode-build-number:
inputs:
- plist_path: "$DEV_PLIST_PATH"
- build_version: "$CUSTOM_BUILD_NUMBER"
- script:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
gem install xcpretty-json-formatter
XCPRETTY_JSON_FILE_OUTPUT=build_results.json
set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace $BITRISE_PROJECT_PATH -scheme $BITRISE_SCHEME build test -destination 'platform=iOS Simulator,name=iPhone X' SWIFT_WHOLE_MODULE_OPTIMIZATION=YES -skip-testing:$UITEST_SCHEME COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -f `xcpretty-json-formatter` --color
title: Xcodebuild test
- cache-push: {}
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
## Running Danger
bundle exec danger
title: Danger
envs:
- opts:
is_expand: false
UITEST_SCHEME: XXXXUITests
trigger_map:
- pull_request_source_branch: "*"
workflow: Danger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment