phase 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/phase/cli/ipa.rb +2 -2
- data/lib/phase/kit/ipa/enterprise_deployment.rb +36 -18
- data/lib/phase/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: 81ed72ffd7d7b6c3b2f4ca73388843b33908baef
|
4
|
+
data.tar.gz: 05d073ed682a2c9cc7ceda09f2f923d12b4e5131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e21306de049538b18407cf257cc6b71bc0a06a3da9567a8d5dbe63d33474f6dac82220876a47dc6a69b66d309560e3ca999e9ba85ef00f97aa36ff09646e1cd
|
7
|
+
data.tar.gz: 166dd495073166248ffc039c002c4cc0c6abe1afa91275cb8091fc6bc03fb7e01f9a09b06e2ec2c03834bfc177eefdf8bdeace3b2d102d74beb7721a05ec19ee
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
data/lib/phase/cli/ipa.rb
CHANGED
@@ -3,7 +3,7 @@ module Phase
|
|
3
3
|
class IPA < Command
|
4
4
|
|
5
5
|
command :ipa do |c|
|
6
|
-
c.syntax = "phase ipa [version_number] [filename|
|
6
|
+
c.syntax = "phase ipa [version_number] [filename|glob_pattern]..."
|
7
7
|
|
8
8
|
c.description = <<-EOS.strip_heredoc
|
9
9
|
Generates enterprise distribution .plists for .ipa app bundles and uploads
|
@@ -22,7 +22,7 @@ module Phase
|
|
22
22
|
@filenames = args
|
23
23
|
|
24
24
|
if @version.blank? || @filenames.blank?
|
25
|
-
fail "invalid syntax: phase ipa [
|
25
|
+
fail "invalid syntax: phase ipa [version_number] [filename|glob_pattern]..."
|
26
26
|
end
|
27
27
|
|
28
28
|
if Phase.config.ipa.bundle_id_prefix.blank?
|
@@ -24,29 +24,37 @@ module Phase
|
|
24
24
|
def run!
|
25
25
|
::FileUtils.mkdir(version) rescue nil
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
app = App.new(path, version)
|
31
|
-
app.download_url = download_url(app)
|
27
|
+
manifest_hash = file_paths.reduce({}) do |hash, path|
|
28
|
+
app = App.new(path, version)
|
29
|
+
app.download_url = download_url(app)
|
32
30
|
|
33
|
-
|
34
|
-
|
31
|
+
log "#{app.name}: writing .plist..."
|
32
|
+
write_plist!(app)
|
35
33
|
|
36
|
-
|
37
|
-
|
34
|
+
log "#{app.name}: copying .ipa..."
|
35
|
+
copy_ipa!(app)
|
38
36
|
|
39
|
-
|
40
|
-
|
37
|
+
log "#{app.name}: uploading files..."
|
38
|
+
upload_app!(app)
|
41
39
|
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
log "#{app.name}: building app manifest..."
|
41
|
+
hash[app.name] = {
|
42
|
+
latest_version: app.version,
|
43
|
+
download_url: manifest_url(app)
|
44
|
+
}
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
log "#{app.name}: done"
|
47
|
+
log ""
|
48
|
+
|
49
|
+
hash
|
49
50
|
end
|
51
|
+
|
52
|
+
manifest_path = ::File.join(::Dir.pwd, version, "manifest.json")
|
53
|
+
::File.write(manifest_path, manifest_hash.to_json)
|
54
|
+
|
55
|
+
log "uploading release manifest..."
|
56
|
+
upload_manifest!(manifest_path)
|
57
|
+
log "done"
|
50
58
|
end
|
51
59
|
|
52
60
|
def write_plist!(app)
|
@@ -57,7 +65,7 @@ module Phase
|
|
57
65
|
::FileUtils.cp(app.qualified_path, ipa_path(app))
|
58
66
|
end
|
59
67
|
|
60
|
-
def
|
68
|
+
def upload_app!(app)
|
61
69
|
ipa = bucket.files.new({
|
62
70
|
key: prefix.join(app.ipa_filename),
|
63
71
|
body: ::File.open(ipa_path(app)),
|
@@ -74,6 +82,16 @@ module Phase
|
|
74
82
|
plist.save
|
75
83
|
end
|
76
84
|
|
85
|
+
def upload_manifest!(manifest_path)
|
86
|
+
manifest = bucket.files.new({
|
87
|
+
key: "enterprise/manifest.json",
|
88
|
+
body: ::File.open(manifest_path),
|
89
|
+
acl: "public-read"
|
90
|
+
})
|
91
|
+
|
92
|
+
manifest.save
|
93
|
+
end
|
94
|
+
|
77
95
|
private
|
78
96
|
|
79
97
|
def download_url(app)
|
data/lib/phase/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piers Mainwaring
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|