From 4e8bdc0f9f78834fb8e031deff2c2add0df76983 Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Tue, 8 Sep 2015 11:06:28 +0200 Subject: [PATCH] update --- .gitignore | 1 + bitrise.yml | 20 +++++ step.sh | 2 +- step.yml | 188 ++++++++++++++++++++-------------------- testfairy-upload-ios.sh | 28 +++--- 5 files changed, 132 insertions(+), 107 deletions(-) create mode 100644 .gitignore create mode 100644 bitrise.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6397b46 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.bitrise* diff --git a/bitrise.yml b/bitrise.yml new file mode 100644 index 0000000..8952e69 --- /dev/null +++ b/bitrise.yml @@ -0,0 +1,20 @@ +format_version: 0.9.10 +default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git + +app: + envs: + # define these in your .bitrise.secrets.yml + - api_key: + - ipa_path: + - dsym_path: + - tester_groups: + - notify: + - auto_update: + - video_recording: + - comment: + +workflows: + test: + steps: + - path::./: + inputs: diff --git a/step.sh b/step.sh index 368b6de..7fe7a1a 100755 --- a/step.sh +++ b/step.sh @@ -2,5 +2,5 @@ THIS_SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -bash "${THIS_SCRIPTDIR}/testfairy-upload-ios.sh" "$TESTFAIRY_IPA_PATH" +bash "${THIS_SCRIPTDIR}/testfairy-upload-ios.sh" "$ipa_path" exit $? \ No newline at end of file diff --git a/step.yml b/step.yml index 1734615..c55f8cf 100755 --- a/step.yml +++ b/step.yml @@ -1,11 +1,11 @@ -name: "TestFairy Deploy" -description: | +title: "TestFairy Deploy" +summary: "TestFairy Deploy" +description: |- To use this step you have to register an account on [TestFairy.com](http://testfairy.com/). website: https://github.com/bitrise-io/steps-testfairy-deploy -fork_url: https://github.com/bitrise-io/steps-testfairy-deploy -source: - git: https://github.com/bitrise-io/steps-testfairy-deploy.git +source_code_url: https://github.com/bitrise-io/steps-testfairy-deploy +support_url: https://github.com/bitrise-io/steps-testfairy-deploy/issues host_os_tags: - "osx-10.10" project_type_tags: @@ -14,92 +14,96 @@ type_tags: - "testfairy" - "deploy" is_requires_admin_user: false +is_always_run: false +is_skippable: false +dependencies: [] +run_if: "" inputs: - - - mapped_to: TESTFAIRY_API_KEY - title: "TestFairy API key" - description: | - API key from TestFairy. - You can find your API key under the settings menu. - is_required: true - is_expand: false - value: "" - is_dont_change_value: false - - - mapped_to: TESTFAIRY_IPA_PATH - title: "IPA path" - description: | - Path for the IPA to upload to TestFairy. - is_required: true - is_expand: true - value: "" - is_dont_change_value: false - - - mapped_to: TESTFAIRY_DSYM_PATH - title: "dSYM path" - description: | - Path for the dSYM to upload to TestFairy. - is_required: false - is_expand: true - value: "" - is_dont_change_value: false - - - mapped_to: TESTFAIRY_TESTER_GROUPS - title: "Tester groups" - description: | - Tester Groups that will be notified when the app is ready. - Setup groups in your TestFairy account testers page. - is_required: false - is_expand: false - value: "" - is_dont_change_value: false - - - mapped_to: TESTFAIRY_NOTIFY - title: "Email notification" - description: | - Sets if should email testers about new version. - is_required: false - is_expand: false - value: "off" - value_options: ["on", "off"] - is_dont_change_value: false - - - mapped_to: TESTFAIRY_AUTO_UPDATE - title: "Auto update" - description: | - If auto update is on all users will be prompt to update - to this build next time they run the app. - is_required: false - is_expand: false - value: "off" - value_options: ["on", "off"] - is_dont_change_value: false - - - mapped_to: TESTFAIRY_MAX_TEST_DURATION - title: "Recording duration" - description: | - Maximum session recording length, eg 20m or 1h. Maximum 24h. - is_required: false - is_expand: false - value: "10m" - is_dont_change_value: false - - - mapped_to: TESTFAIRY_VIDEO_RECORDING - title: "Video recording" - description: | - Sets if video recording is enabled for this build. - is_required: false - is_expand: false - value: "off" - value_options: ["on", "wifi", "off"] - is_dont_change_value: false - - - mapped_to: TESTFAIRY_COMMENT - title: "Comments" - description: | - Comment text will be included in the email sent to testers. - is_required: false - is_expand: false - value: "" - is_dont_change_value: false + - api_key: "" + opts: + title: "TestFairy API key" + summary: "" + description: |- + API key from TestFairy. + You can find your API key under the settings menu. + is_required: true + is_expand: false + is_dont_change_value: false + - ipa_path: "" + opts: + title: "IPA path" + summary: "" + description: |- + Path for the IPA to upload to TestFairy. + is_required: true + is_expand: true + is_dont_change_value: false + - dsym_path: "" + opts: + title: "dSYM path" + summary: "" + description: |- + Path for the dSYM to upload to TestFairy. + is_required: false + is_expand: true + is_dont_change_value: false + - tester_groups: "" + opts: + title: "Tester groups" + summary: "" + description: |- + Tester Groups that will be notified when the app is ready. + Setup groups in your TestFairy account testers page. + is_required: false + is_expand: false + is_dont_change_value: false + - notify: "off" + opts: + title: "Email notification" + summary: "" + description: |- + Sets if should email testers about new version. + value_options: ["on", "off"] + is_required: false + is_expand: false + is_dont_change_value: false + - auto_update: "off" + opts: + title: "Auto update" + summary: "" + description: |- + If auto update is on all users will be prompt to update + to this build next time they run the app. + value_options: ["on", "off"] + is_required: false + is_expand: false + is_dont_change_value: false + - max_test_duration: "10m" + opts: + title: "Recording duration" + summary: "" + description: |- + Maximum session recording length, eg 20m or 1h. Maximum 24h. + is_required: false + is_expand: false + is_dont_change_value: false + - video_recording: "off" + opts: + title: "Video recording" + summary: "" + description: |- + Sets if video recording is enabled for this build. + value_options: ["on", "wifi", "off"] + is_required: false + is_expand: false + is_dont_change_value: false + - comment: "" + opts: + title: "Comments" + summary: "" + description: |- + Comment text will be included in the email sent to testers. + is_required: false + is_expand: false + is_dont_change_value: false outputs: [] diff --git a/testfairy-upload-ios.sh b/testfairy-upload-ios.sh index 093c9a2..63d4563 100755 --- a/testfairy-upload-ios.sh +++ b/testfairy-upload-ios.sh @@ -8,24 +8,24 @@ UPLOADER_VERSION=1.09 # Tester Groups that will be notified when the app is ready. Setup groups in your TestFairy account testers page. # This parameter is optional, leave empty if not required -TESTER_GROUPS="$TESTFAIRY_TESTER_GROUPS" +TESTER_GROUPS="$tester_groups" # Should email testers about new version. Set to "off" to disable email notifications. -NOTIFY="$TESTFAIRY_NOTIFY" +NOTIFY="$notify" # If AUTO_UPDATE is "on" all users will be prompt to update to this build next time they run the app -AUTO_UPDATE="$TESTFAIRY_AUTO_UPDATE" +AUTO_UPDATE="$auto_update" -# The maximum recording duration for every test. -MAX_DURATION="$TESTFAIRY_MAX_TEST_DURATION" +# The maximum recording duration for every test. +MAX_DURATION="$max_test_duration" -# Is video recording enabled for this build. valid values: "on", "off", "wifi" -VIDEO="$TESTFAIRY_VIDEO_RECORDING" +# Is video recording enabled for this build. valid values: "on", "off", "wifi" +VIDEO="$video_recording" # Comment text will be included in the email sent to testers -COMMENT="$TESTFAIRY_COMMENT" +COMMENT="$comment" -DSYM_FILENAME="$TESTFAIRY_DSYM_PATH" +DSYM_FILENAME="$dsym_path" # locations of various tools CURL=curl @@ -36,7 +36,7 @@ usage() { echo "Usage: testfairy-upload-ios.sh IPA_FILENAME" echo } - + verify_tools() { # Windows users: this script requires curl. If not installed please get from http://cygwin.com/ @@ -50,7 +50,7 @@ verify_tools() { } verify_settings() { - if [ -z "${TESTFAIRY_API_KEY}" ]; then + if [ -z "${api_key}" ]; then usage echo "Please update API_KEY with your private API key, as noted in the Settings page" exit 1 @@ -78,9 +78,9 @@ DATE=`date` /bin/echo -n "Uploading ${IPA_FILENAME} to TestFairy.. " if [ ! -f "${DSYM_FILENAME}" ]; then - JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${TESTFAIRY_API_KEY} -F file="@${IPA_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" ) + JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${api_key} -F file="@${IPA_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" ) else - JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${TESTFAIRY_API_KEY} -F file="@${IPA_FILENAME}" -F symbols_file="@${DSYM_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" ) + JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${api_key} -F file="@${IPA_FILENAME}" -F symbols_file="@${DSYM_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" ) fi MESSAGE=$( echo ${JSON} | sed 's/\\\//\//g' | sed -n 's/.*"message"\s*:\s*"\([^"]*\)".*/\1/p' ) @@ -100,4 +100,4 @@ fi write_section_to_formatted_output "## Deploy Success" echo_string_to_formatted_output "* **Build URL**: [${URL}](${URL})" -exit 0 \ No newline at end of file +exit 0