sigh 0.4.5 → 0.4.6
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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/sigh/developer_center.rb +7 -1
- data/lib/sigh/manager.rb +22 -4
- data/lib/sigh/options.rb +3 -2
- data/lib/sigh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fece88a2b502bd29e41ced6c921a8c97d221335
|
4
|
+
data.tar.gz: 4e03359dc43cdf2ca6d99d3ccd4ab2efe5fd475c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7deaa5a4997810fdc8778d0a5b05012018450fb41c4c20152f592126e3a8cadad97054cee5d21ea5b22539cb5abfcb36706ae64922e4d351a4a9f2d9fdcc185b
|
7
|
+
data.tar.gz: 129307aef0c3b9431b8c6c52f6d842e9aeaf415fa154a883723866456f8f6a0430fd771b386949cb4b04c84015941f15e8173b15888305aa71a7ecdafa6a6acd
|
data/README.md
CHANGED
@@ -34,12 +34,14 @@ sigh
|
|
34
34
|
|
35
35
|
Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
|
36
36
|
|
37
|
+
Special thanks to [Matthias Tretter](https://twitter.com/myell0w) for coming up with the name.
|
38
|
+
|
37
39
|
-------
|
38
40
|
<p align="center">
|
39
41
|
<a href="#features">Features</a> •
|
40
42
|
<a href="#installation">Installation</a> •
|
41
43
|
<a href="#usage">Usage</a> •
|
42
|
-
<a href="#
|
44
|
+
<a href="#resign">Resign</a> •
|
43
45
|
<a href="#how-does-it-work">How does it work?</a> •
|
44
46
|
<a href="#tips">Tips</a> •
|
45
47
|
<a href="#need-help">Need help?</a>
|
@@ -18,6 +18,7 @@ module Sigh
|
|
18
18
|
cert = maintain_app_certificate # create/download the certificate
|
19
19
|
|
20
20
|
type_name = "Distribution" if @type == APPSTORE # both enterprise and App Store
|
21
|
+
type_name = "Development" unless @type == APPSTORE
|
21
22
|
cert_name ||= "#{type_name}_#{Sigh.config[:app_identifier]}.mobileprovision" # default name
|
22
23
|
cert_name += '.mobileprovision' unless cert_name.include?'mobileprovision'
|
23
24
|
|
@@ -50,6 +51,8 @@ module Sigh
|
|
50
51
|
|
51
52
|
certs = post_ajax(@list_certs_url)
|
52
53
|
|
54
|
+
profile_name = Sigh.config[:provisioning_name]
|
55
|
+
|
53
56
|
Helper.log.info "Checking if profile is available. (#{certs['provisioningProfiles'].count} profiles found)"
|
54
57
|
required_cert_types = (@type == DEVELOPMENT ? ['iOS Development'] : ['iOS Distribution', 'iOS UniversalDistribution'])
|
55
58
|
certs['provisioningProfiles'].each do |current_cert|
|
@@ -58,6 +61,9 @@ module Sigh
|
|
58
61
|
details = profile_details(current_cert['provisioningProfileId'])
|
59
62
|
|
60
63
|
if details['provisioningProfile']['appId']['identifier'] == Sigh.config[:app_identifier]
|
64
|
+
|
65
|
+
next if profile_name && details['provisioningProfile']['name'] != profile_name
|
66
|
+
|
61
67
|
# that's an Ad Hoc profile. I didn't find a better way to detect if it's one ... skipping it
|
62
68
|
next if @type == APPSTORE && details['provisioningProfile']['deviceCount'] > 0
|
63
69
|
|
@@ -171,7 +177,7 @@ module Sigh
|
|
171
177
|
|
172
178
|
# 5) Choose a profile name
|
173
179
|
wait_for_elements('.distributionType')
|
174
|
-
profile_name = Sigh.config[:
|
180
|
+
profile_name = Sigh.config[:provisioning_name]
|
175
181
|
profile_name ||= [app_identifier, @type].join(' ')
|
176
182
|
fill_in "provisioningProfileName", with: profile_name
|
177
183
|
click_next
|
data/lib/sigh/manager.rb
CHANGED
@@ -4,19 +4,37 @@ module Sigh
|
|
4
4
|
path = Sigh::DeveloperCenter.new.run
|
5
5
|
|
6
6
|
return nil unless path
|
7
|
-
|
7
|
+
|
8
8
|
if Sigh.config[:filename]
|
9
9
|
file_name = Sigh.config[:filename]
|
10
10
|
else
|
11
11
|
file_name = File.basename(path)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
output = File.join(Sigh.config[:output_path].gsub("~", ENV["HOME"]), file_name)
|
15
15
|
(FileUtils.mv(path, output) rescue nil) # in case it already exists
|
16
|
-
|
16
|
+
|
17
|
+
install_profile(output) unless Sigh.config[:skip_install]
|
18
|
+
|
17
19
|
puts output.green
|
18
20
|
|
19
|
-
return File.expand_path(output)
|
21
|
+
return File.expand_path(output)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.install_profile(profile)
|
25
|
+
Helper.log.info "Installing provisioning profile..."
|
26
|
+
profile_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
|
27
|
+
profile_filename = ENV["SIGH_UDID"] + ".mobileprovision"
|
28
|
+
destination = profile_path + profile_filename
|
29
|
+
|
30
|
+
# copy to Xcode provisioning profile directory
|
31
|
+
FileUtils.copy profile, destination
|
32
|
+
|
33
|
+
if File.exists? destination
|
34
|
+
Helper.log.info "Profile installed at \"#{destination}\""
|
35
|
+
else
|
36
|
+
raise "Failed installation of provisioning profile at location: #{destination}".red
|
37
|
+
end
|
20
38
|
end
|
21
39
|
end
|
22
40
|
end
|
data/lib/sigh/options.rb
CHANGED
@@ -5,6 +5,7 @@ module Sigh
|
|
5
5
|
def self.available_options
|
6
6
|
@@options ||= [
|
7
7
|
FastlaneCore::ConfigItem.new(key: :adhoc,
|
8
|
+
short_option: "-k",
|
8
9
|
env_name: "SIGH_AD_HOC",
|
9
10
|
description: "Setting this flag will generate AdHoc profiles instead of App Store Profiles",
|
10
11
|
is_string: false),
|
@@ -41,10 +42,10 @@ module Sigh
|
|
41
42
|
verify_block: Proc.new do |value|
|
42
43
|
ENV["FASTLANE_TEAM_ID"] = value
|
43
44
|
end),
|
44
|
-
FastlaneCore::ConfigItem.new(key: :
|
45
|
+
FastlaneCore::ConfigItem.new(key: :provisioning_name,
|
45
46
|
short_option: "-n",
|
46
47
|
env_name: "SIGH_PROVISIONING_PROFILE_NAME",
|
47
|
-
description: "The name of the
|
48
|
+
description: "The name of the profile that is used on the Apple Developer Portal",
|
48
49
|
optional: true),
|
49
50
|
FastlaneCore::ConfigItem.new(key: :output_path,
|
50
51
|
short_option: "-o",
|
data/lib/sigh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sigh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|