instabug-xcodebot-upload 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/instabug-xcodebot-upload +46 -46
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb7a39cb04719f09c25ffae805c84f12bba66c5
4
- data.tar.gz: 7fcaf0b36ae31abfca75db3c1930c7d98fdb4b03
3
+ metadata.gz: 292e40720a3446ea04f61e514ade2bf9b8680c44
4
+ data.tar.gz: 37d1bbb436393f979c4eca611c94aed31aa7705f
5
5
  SHA512:
6
- metadata.gz: ba7f1bd46883e536b275f2a12104b3c43592371cedfd69cca87f3b37eda320712d305d2d3261e5be597b390d23c0fde4bc1ace39543e3145e1db22c0e8771644
7
- data.tar.gz: c7bb18f35264e75f59a30691eb8575642611ae1f05f08ac04deab920ecc1c2301599ddcdbe7ae93bdd7219d78927becb1479d4198c3d31f5393a4d8d7e1debaa
6
+ metadata.gz: 85f3a1705326424e93760e821c0c1437543ed0ace159a07f9dceb52eb598b678b6aac4ae18b352ce8325c8915efc2b823f56e03e8fb6f6f5a1159cda6356674e
7
+ data.tar.gz: 4b81913ef8a0bd2f16c465f5cd982a816e92d148703c0c9ba71f6b873d141a604471e2714f9bada328cfa27283fc7e77efa23ae5d52590c060b41f8bc021a017
@@ -7,7 +7,7 @@ INSTABUG_ENDPOINT = "https://api.instabug.com/api/ios/v1/dsym"
7
7
 
8
8
  options = {}
9
9
  OptionParser.new do |opts|
10
- opts.banner = "Usage: instabug-upload [options]"
10
+ opts.banner = "Usage: instabug-xcodebot-upload [options]"
11
11
 
12
12
  opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
13
13
  options[:verbose] = v
@@ -44,61 +44,61 @@ end
44
44
  # Get a list of the dSYMs
45
45
  dsym_list = Dir.glob(File.join(dsym_path, "*.dSYM"))
46
46
 
47
- # Change to dsym dir
48
- Dir.chdir dsym_path do
47
+ # Change to dsym dir
48
+ Dir.chdir dsym_path do
49
49
 
50
- # Read project version
51
- version = IO.popen(["/usr/libexec/PlistBuddy",
52
- "-c",
53
- "Print :ApplicationProperties:CFBundleShortVersionString",
54
- File.join(archive_path, "Info.plist")]).read.strip
50
+ # Read project version
51
+ version = IO.popen(["/usr/libexec/PlistBuddy",
52
+ "-c",
53
+ "Print :ApplicationProperties:CFBundleShortVersionString",
54
+ File.join(archive_path, "Info.plist")]).read.strip
55
55
 
56
- # Loop through dSYMs, zip and upload each
57
- dsym_list.each do |dsym|
58
- dsym_base_name = File.basename(dsym)
56
+ # Loop through dSYMs, zip and upload each
57
+ dsym_list.each do |dsym|
58
+ dsym_base_name = File.basename(dsym)
59
59
 
60
- # Zip it
61
- dsym_zip_name = "#{dsym_base_name}-#{version}.zip"
60
+ # Zip it
61
+ dsym_zip_name = "#{dsym_base_name}-#{version}.zip"
62
62
 
63
- puts "Zipping #{dsym_zip_name}..." if options[:verbose]
63
+ puts "Zipping #{dsym_zip_name}..." if options[:verbose]
64
64
 
65
- success = system("/usr/bin/zip", "-rq9", dsym_zip_name, dsym_base_name)
65
+ success = system("/usr/bin/zip", "-rq9", dsym_zip_name, dsym_base_name)
66
66
 
67
- # If it failed, make sure to delete it
68
- unless success
69
- File.unlink(dsym_zip_name) if File.exists?(dsym_zip_name)
70
- puts "Failed to create zip file: #{dsym_zip_name}. Aborting"
71
- exit 1
72
- end
67
+ # If it failed, make sure to delete it
68
+ unless success
69
+ File.unlink(dsym_zip_name) if File.exists?(dsym_zip_name)
70
+ puts "Failed to create zip file: #{dsym_zip_name}. Aborting"
71
+ exit 1
72
+ end
73
73
 
74
- # Upload the zip
75
- output = IO.popen(["curl",
76
- INSTABUG_ENDPOINT,
77
- "-w %{http_code}",
78
- "--silent",
79
- "-o /dev/null",
80
- "-F",
81
- "dsym=@\"#{dsym_zip_name}\"",
82
- "-F",
83
- "token=#{options[:api_key]}"]).read.strip
84
-
85
- # Remove zip file
86
- File.unlink(dsym_zip_name)
74
+ # Upload the zip
75
+ output = IO.popen(["curl",
76
+ INSTABUG_ENDPOINT,
77
+ "-w %{http_code}",
78
+ "--silent",
79
+ "-o /dev/null",
80
+ "-F",
81
+ "dsym=@\"#{dsym_zip_name}\"",
82
+ "-F",
83
+ "token=#{options[:api_key]}"]).read.strip
84
+
85
+ # Remove zip file
86
+ File.unlink(dsym_zip_name)
87
87
 
88
- if output == "000"
89
- puts "Failed to upload zip file. No internet connection. Aborting"
90
- exit 1
91
- elsif output == "422"
92
- puts "Failed to upload zip file: #{dsym_zip_name}. Make sure you are using the correct token. Aborting"
93
- exit 1
94
- elsif output != "200"
95
- puts "Failed to upload zip file: #{dsym_zip_name}. #{output}. Aborting"
96
- exit 1
97
- end
98
-
99
- puts "Completed uploading #{dsym_zip_name}" if options[:verbose]
88
+ if output == "000"
89
+ puts "Failed to upload zip file. No internet connection. Aborting"
90
+ exit 1
91
+ elsif output == "422"
92
+ puts "Failed to upload zip file: #{dsym_zip_name}. Make sure you are using the correct token. Aborting"
93
+ exit 1
94
+ elsif output != "200"
95
+ puts "Failed to upload zip file: #{dsym_zip_name}. #{output}. Aborting"
96
+ exit 1
100
97
  end
98
+
99
+ puts "Completed uploading #{dsym_zip_name}" if options[:verbose]
101
100
  end
101
+ end
102
102
 
103
103
  if options[:verbose]
104
104
  puts "Uploaded the following dSYMs: #{dsym_list.join(', ')}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instabug-xcodebot-upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Gabriele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Uploads dSYMs from the xcarchive to Instabug via an After-Integration
14
14
  Trigger