sigh 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/bin/sigh +21 -0
- data/lib/sigh/download_all.rb +33 -0
- data/lib/sigh/manager.rb +10 -1
- data/lib/sigh/options.rb +0 -5
- data/lib/sigh/repair.rb +30 -0
- data/lib/sigh/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c44f958a867e93b5e83cbdaf49ef895b80fc09e4
|
4
|
+
data.tar.gz: 4381cb9b3fb17c256257d4ad427b6c73b387507e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d49dfa1d4a0948c5d96a33594ce449c944e5dec366313ce7962192f7ceaee64bd68b25f96427d71c7e2def81c298b30825ff97a73e235b6de5b8f22487873b0
|
7
|
+
data.tar.gz: 7da07740425fc6028335f5df0468e415a6f689a49945d3b0e1c3225280de6f10369f23ca244c5656444d1dddf45d6c720b8aa6790b9253b740fec1e084ec259a
|
data/README.md
CHANGED
@@ -51,10 +51,6 @@ Special thanks to [Matthias Tretter](https://twitter.com/myell0w) for coming up
|
|
51
51
|
|
52
52
|
<h5 align="center"><code>sigh</code> is part of <a href="https://fastlane.tools">fastlane</a>: connect all deployment tools into one streamlined workflow.</h5>
|
53
53
|
|
54
|
-
### spaceship version
|
55
|
-
|
56
|
-
If you're feeling adventurous and want to test the new `sigh` beta with [spaceship](https://spaceship.airforce), update using `sudo gem update sigh --pre`. More information in the [release notes](https://github.com/KrauseFx/sigh/releases/tag/1.0.0.beta5).
|
57
|
-
|
58
54
|
# Features
|
59
55
|
|
60
56
|
- **Download** the latest provisioning profile for your app
|
@@ -111,6 +107,10 @@ To generate the profile in a specific directory:
|
|
111
107
|
|
112
108
|
sigh -o "~/Certificates/"
|
113
109
|
|
110
|
+
To download all your provisioning profiles use
|
111
|
+
|
112
|
+
sigh download_all
|
113
|
+
|
114
114
|
For a list of available commands run
|
115
115
|
|
116
116
|
sigh --help
|
@@ -129,13 +129,18 @@ If you need the provisioning profile to be renewed regardless of its state use t
|
|
129
129
|
|
130
130
|
sigh --force
|
131
131
|
|
132
|
-
By default,
|
132
|
+
By default, `sigh` will include all certificates on development profiles, and first certificate on other types. If you need to specify which certificate to use you can either use the environment variable `SIGH_CERTIFICATE`, or pass the name or expiry date of the certificate as argument:
|
133
133
|
|
134
134
|
sigh -c "SunApps GmbH"
|
135
135
|
|
136
|
-
|
136
|
+
# Repair
|
137
|
+
|
138
|
+
`sigh` can automatically repair all your existing provisioning profiles which are expired or just invalid.
|
139
|
+
|
140
|
+
All you have to do is
|
141
|
+
|
142
|
+
sigh repair
|
137
143
|
|
138
|
-
sigh -d "Nov 11, 2017"
|
139
144
|
|
140
145
|
# Resign
|
141
146
|
|
@@ -176,7 +181,6 @@ Choose signing certificate to use:
|
|
176
181
|
|
177
182
|
- `SIGH_CERTIFICATE` (The name of the certificate to use)
|
178
183
|
- `SIGH_CERTIFICATE_ID` (The ID of the certificate)
|
179
|
-
- `SIGH_CERTIFICATE_EXPIRE_DATE` (The expire date of the certificate)
|
180
184
|
|
181
185
|
As always, run `sigh --help` to get a list of all variables.
|
182
186
|
|
@@ -186,7 +190,7 @@ If you're using [cert](https://github.com/KrauseFx/cert) in combination with [fa
|
|
186
190
|
|
187
191
|
# How does it work?
|
188
192
|
|
189
|
-
```sigh``` will access the ```iOS Dev Center``` to download, renew or generate the ```.mobileprovision``` file.
|
193
|
+
```sigh``` will access the ```iOS Dev Center``` to download, renew or generate the ```.mobileprovision``` file. It uses [spaceship](https://spaceship.airforce) to communicate with Apple's web services.
|
190
194
|
|
191
195
|
|
192
196
|
## How is my password stored?
|
data/bin/sigh
CHANGED
@@ -37,6 +37,27 @@ class SighApplication
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
command :download_all do |c|
|
41
|
+
c.syntax = 'sigh download_all'
|
42
|
+
c.description = 'Downloads all valid provisioning profiles'
|
43
|
+
|
44
|
+
c.action do |args, options|
|
45
|
+
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options.__hash__)
|
46
|
+
Sigh::Manager.download_all
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
command :repair do |c|
|
51
|
+
c.syntax = 'sigh repair'
|
52
|
+
c.description = 'Repairs all expired or invalid provisioning profiles'
|
53
|
+
|
54
|
+
c.action do |args, options|
|
55
|
+
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options.__hash__)
|
56
|
+
require 'sigh/repair'
|
57
|
+
Sigh::Repair.new.repair_all
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
40
61
|
command :resign do |c|
|
41
62
|
c.syntax = 'sigh resign'
|
42
63
|
c.description = 'Resigns an existing ipa file with the given provisioning profile'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Sigh
|
2
|
+
class DownloadAll
|
3
|
+
# Download all valid provisioning profiles
|
4
|
+
def download_all
|
5
|
+
Helper.log.info "Starting login"
|
6
|
+
Spaceship.login(Sigh.config[:username], nil)
|
7
|
+
Spaceship.select_team
|
8
|
+
Helper.log.info "Successfully logged in"
|
9
|
+
|
10
|
+
Spaceship.provisioning_profile.all.each do |profile|
|
11
|
+
if profile.valid?
|
12
|
+
Helper.log.info "Downloading profile '#{profile.name}'...".green
|
13
|
+
download_profile(profile)
|
14
|
+
else
|
15
|
+
Helper.log.info "Skipping invalid/expired profile '#{profile.name}'".yellow
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def download_profile(profile)
|
21
|
+
output = Sigh.config[:output_path] || "/tmp"
|
22
|
+
|
23
|
+
profile_name = "#{profile.class.pretty_type}_#{profile.app.bundle_id}.mobileprovision" # default name
|
24
|
+
|
25
|
+
output_path = File.join(output, profile_name)
|
26
|
+
dataWritten = File.open(output_path, "wb") do |f|
|
27
|
+
f.write(profile.download)
|
28
|
+
end
|
29
|
+
|
30
|
+
Manager.install_profile(output_path) unless Sigh.config[:skip_install]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/sigh/manager.rb
CHANGED
@@ -4,7 +4,6 @@ require 'sigh/spaceship/runner'
|
|
4
4
|
module Sigh
|
5
5
|
class Manager
|
6
6
|
def self.start
|
7
|
-
start = Time.now
|
8
7
|
path = Sigh::Runner.new.run
|
9
8
|
|
10
9
|
return nil unless path
|
@@ -25,8 +24,18 @@ module Sigh
|
|
25
24
|
return File.expand_path(output)
|
26
25
|
end
|
27
26
|
|
27
|
+
def self.download_all
|
28
|
+
require 'sigh/download_all'
|
29
|
+
DownloadAll.new.download_all
|
30
|
+
end
|
31
|
+
|
28
32
|
def self.install_profile(profile)
|
29
33
|
Helper.log.info "Installing provisioning profile..."
|
34
|
+
|
35
|
+
require 'sigh/profile_analyser'
|
36
|
+
udid = Sigh::ProfileAnalyser.run(profile)
|
37
|
+
ENV["SIGH_UDID"] = udid if udid
|
38
|
+
|
30
39
|
profile_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
|
31
40
|
profile_filename = ENV["SIGH_UDID"] + ".mobileprovision"
|
32
41
|
destination = profile_path + profile_filename
|
data/lib/sigh/options.rb
CHANGED
@@ -80,11 +80,6 @@ module Sigh
|
|
80
80
|
env_name: "SIGH_CERTIFICATE",
|
81
81
|
description: "The certificate name to use for new profiles, or to renew with. (e.g. \"Felix Krause\")",
|
82
82
|
optional: true),
|
83
|
-
FastlaneCore::ConfigItem.new(key: :cert_date,
|
84
|
-
short_option: "-d",
|
85
|
-
env_name: "SIGH_CERTIFICATE_EXPIRE_DATE",
|
86
|
-
description: "The certificate with the given expiry date used to renew. (e.g. \"Nov 11, 2017\")",
|
87
|
-
optional: true),
|
88
83
|
FastlaneCore::ConfigItem.new(key: :filename,
|
89
84
|
short_option: "-f",
|
90
85
|
env_name: "SIGH_PROFILE_FILE_NAME",
|
data/lib/sigh/repair.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module Sigh
|
2
|
+
class Repair
|
3
|
+
def repair_all
|
4
|
+
Helper.log.info "Starting login"
|
5
|
+
Spaceship.login(Sigh.config[:username], nil)
|
6
|
+
Spaceship.select_team
|
7
|
+
Helper.log.info "Successfully logged in"
|
8
|
+
|
9
|
+
# Select all 'Invalid' or 'Expired' provisioning profiles
|
10
|
+
broken_profiles = Spaceship.provisioning_profile.all.find_all do |profile|
|
11
|
+
(profile.status == "Invalid" or profile.status == "Expired")
|
12
|
+
end
|
13
|
+
|
14
|
+
if broken_profiles.count == 0
|
15
|
+
Helper.log.info "All provisioning profiles are valid, nothing to do".green
|
16
|
+
return
|
17
|
+
end
|
18
|
+
|
19
|
+
Helper.log.info "Going to repair #{broken_profiles.count} provisioning profiles".green
|
20
|
+
|
21
|
+
# Iterate over all broken profiles and repair them
|
22
|
+
broken_profiles.each do |profile|
|
23
|
+
Helper.log.info "Repairing profile '#{profile.name}'..."
|
24
|
+
profile.repair! # yes, that's all you need to repair a profile
|
25
|
+
end
|
26
|
+
|
27
|
+
Helper.log.info "Successfully repaired #{broken_profiles.count} provisioning profiles".green
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
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
|
+
version: 0.8.0
|
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-06-
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.11
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.11
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,10 +165,12 @@ files:
|
|
165
165
|
- lib/assets/resign.sh
|
166
166
|
- lib/sigh.rb
|
167
167
|
- lib/sigh/dependency_checker.rb
|
168
|
+
- lib/sigh/download_all.rb
|
168
169
|
- lib/sigh/local_manage.rb
|
169
170
|
- lib/sigh/manager.rb
|
170
171
|
- lib/sigh/options.rb
|
171
172
|
- lib/sigh/profile_analyser.rb
|
173
|
+
- lib/sigh/repair.rb
|
172
174
|
- lib/sigh/resign.rb
|
173
175
|
- lib/sigh/spaceship/runner.rb
|
174
176
|
- lib/sigh/version.rb
|