Skip to content

Commit

Permalink
Added install source path in plist' (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shams Ahmed committed Aug 14, 2020
1 parent fc30e2b commit 0889135
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ workflows:
envs:
- MY_STEPLIB_REPO_FORK_GIT_URL: https://github.com/shams-ahmed/bitrise-steplib.git
- STEP_ID_IN_STEPLIB: add-trace-sdk
- STEP_GIT_VERION_TAG_TO_SHARE: 1.0.3
- STEP_GIT_VERION_TAG_TO_SHARE: 1.0.4
- STEP_GIT_CLONE_URL: https://github.com/bitrise-steplib/bitrise-step-add-trace-sdk.git
before_run:
- audit-this-step
Expand Down
4 changes: 3 additions & 1 deletion project_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def register_resource()
bitrise_configuration_path = "#{@project.path}/../bitrise_configuration.plist"

obj = Xcodeproj::Plist.write_to_path({
"APM_COLLECTOR_TOKEN" => apm_collector_token
"APM_COLLECTOR_TOKEN" => apm_collector_token,
"APM_COLLECTOR_ENVIRONMENT" => "",
"APM_INSTALLATION_SOURCE" => "Trace step"
}, bitrise_configuration_path)

added_fileref = @project.new_file(bitrise_configuration_path)
Expand Down
2 changes: 1 addition & 1 deletion step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_relative 'functions'

if !ENV['APM_COLLECTOR_TOKEN']
puts 'Error: missing APM_COLLECTOR_TOKEN env'
puts 'Error: missing APM_COLLECTOR_TOKEN env, double check envman and if Trace has been enabled in app by navigating to Addon->Trace'
exit 1
end

Expand Down
5 changes: 5 additions & 0 deletions step_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@
puts "Collector token #{plist['APM_COLLECTOR_TOKEN']} in plist does not match test token #{ENV['APM_COLLECTOR_TOKEN']}"
exit 1
end

if plist['APM_INSTALLATION_SOURCE'] != "Trace step"
puts "APM_INSTALLATION_SOURCE has not been set to Trace step"
exit 1
end

0 comments on commit 0889135

Please sign in to comment.