Skip to content

Commit

Permalink
testing, code and logging revision
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorbenei committed Nov 6, 2015
1 parent 45ee75d commit f37318a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
17 changes: 15 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
format_version: 0.9.10
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

app:
envs:
# define these in your .bitrise.secrets.yml
- BITRISE_SOURCE_DIR:
- PROJECT_WORKDIR:
- BITRISE_PROJECT_PATH:
- BITRISE_SCHEME:
# for force-code-sign mode
Expand All @@ -14,6 +14,19 @@ app:
workflows:
test:
steps:
- change-workdir:
title: Switch working dir to test/_tmp dir
description: |-
To prevent step testing issues, like referencing relative
files with just './some-file', which would work for local tests
but not if the step is included in another bitrise.yml!
run_if: true
inputs:
- path: ./_tmp
- is_create_path: true
- path::./:
inputs:
- is_force_code_sign: "no"
- is_clean_build: "no"
- build_tool: xctool
- workdir: $PROJECT_WORKDIR
14 changes: 11 additions & 3 deletions step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
if [ -z "${build_tool}" ] ; then
echo "[!] Missing required input: build_tool"
exit 1
elif [ "${build_tool}" != "xctool" ] && [ "${build_tool}" != "xcodebuild" ]; then
elif [[ "${build_tool}" != "xctool" && "${build_tool}" != "xcodebuild" ]] ; then
echo "[!] Invalid build_tool: ${build_tool}"
exit 1
fi
Expand Down Expand Up @@ -62,13 +62,21 @@ fi
if [[ "${is_force_code_sign}" == "yes" ]] ; then
echo " (!) Using Force Code Signing mode!"

"${build_tool}" ${CONFIG_xcode_project_action} "${project_path}" \
echo
echo

set -x
${build_tool} ${CONFIG_xcode_project_action} "${project_path}" \
-scheme "${scheme}" \
${clean_build_param} analyze \
PROVISIONING_PROFILE="${BITRISE_PROVISIONING_PROFILE_ID}" \
CODE_SIGN_IDENTITY="${BITRISE_CODE_SIGN_IDENTITY}"
else
"${build_tool}" ${CONFIG_xcode_project_action} "${project_path}" \
echo
echo

set -x
${build_tool} ${CONFIG_xcode_project_action} "${project_path}" \
-scheme "${scheme}" \
${clean_build_param} analyze
fi
Expand Down
8 changes: 5 additions & 3 deletions step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ type_tags:
is_requires_admin_user: false
is_always_run: false
is_skippable: false
dependencies:
- manager: _
name: xcode
deps:
check_only:
- name: xcode
brew:
- name: xctool
run_if: ""
inputs:
- workdir: $BITRISE_SOURCE_DIR
Expand Down

0 comments on commit f37318a

Please sign in to comment.