phase 0.0.13 → 0.0.14
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 +6 -3
- data/lib/phase/kit/ipa/enterprise_deployment.rb +9 -4
- data/lib/phase/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9590eb70829edd6661e39eb4068ee18a060ec7fa
|
4
|
+
data.tar.gz: a57a7125ac33e183892a1106ffa54b246d9dc00e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391d201d50bdf8fc062a267cbfa9420770ae91ae3ce964ec701b3b0413a59465ecbe91465b08b565898c829504bbf54c1c8f7b1728cdf8101d43e3eecc52366b
|
7
|
+
data.tar.gz: 8ba069008cb11010e2ff2a08287b47684acb68a7d91be271fdc056e4db365bb05bfd494207f9d18defa6a5d577647c35ce2bb07d5aada630aa559e419976ad3f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.14
|
data/lib/phase/cli/ipa.rb
CHANGED
@@ -3,7 +3,9 @@ module Phase
|
|
3
3
|
class IPA < Command
|
4
4
|
|
5
5
|
command :ipa do |c|
|
6
|
-
c.syntax = "phase ipa [
|
6
|
+
c.syntax = "phase ipa [-e environment] version_number filename|glob_pattern..."
|
7
|
+
|
8
|
+
c.option "-e", "--environment name", String, "Uploads files for 'production' or 'staging' (default is 'staging')."
|
7
9
|
|
8
10
|
c.description = <<-EOS.strip_heredoc
|
9
11
|
Generates enterprise distribution .plists for .ipa app bundles and uploads
|
@@ -11,6 +13,7 @@ module Phase
|
|
11
13
|
EOS
|
12
14
|
|
13
15
|
c.action do |args, options|
|
16
|
+
options.default environment: "staging"
|
14
17
|
new(args, options).run
|
15
18
|
end
|
16
19
|
end
|
@@ -22,7 +25,7 @@ module Phase
|
|
22
25
|
@filenames = args
|
23
26
|
|
24
27
|
if @version.blank? || @filenames.blank?
|
25
|
-
fail "invalid syntax: phase ipa [
|
28
|
+
fail "invalid syntax: phase ipa [-e environment] version_number filename|glob_pattern..."
|
26
29
|
end
|
27
30
|
|
28
31
|
if Phase.config.ipa.bundle_id_prefix.blank?
|
@@ -37,7 +40,7 @@ module Phase
|
|
37
40
|
end
|
38
41
|
|
39
42
|
def run
|
40
|
-
deployment = ::Phase::IPA::EnterpriseDeployment.new(version, *filenames)
|
43
|
+
deployment = ::Phase::IPA::EnterpriseDeployment.new(options.environment, version, *filenames)
|
41
44
|
deployment.run!
|
42
45
|
end
|
43
46
|
|
@@ -3,9 +3,9 @@ module Phase
|
|
3
3
|
class EnterpriseDeployment
|
4
4
|
include ::Phase::Util::Console
|
5
5
|
|
6
|
-
attr_reader :version, :file_paths, :aws, :bucket, :prefix, :
|
6
|
+
attr_reader :version, :file_paths, :aws, :bucket, :prefix, :manifest_key
|
7
7
|
|
8
|
-
def initialize(version, *filenames)
|
8
|
+
def initialize(environment, version, *filenames)
|
9
9
|
@version = version
|
10
10
|
@file_paths = filenames.map do |name|
|
11
11
|
::Dir.glob( ::File.expand_path(name) )
|
@@ -18,7 +18,12 @@ module Phase
|
|
18
18
|
@bucket = aws.directories.get(Phase.config.ipa.bucket_name)
|
19
19
|
@prefix = ::Pathname.new(Phase.config.ipa.directory_prefix)
|
20
20
|
|
21
|
-
|
21
|
+
if environment == "production"
|
22
|
+
@manifest_key = "enterprise/manifest.json"
|
23
|
+
else
|
24
|
+
@manifest_key = "enterprise/manifest-staging.json"
|
25
|
+
@prefix = @prefix.join("staging")
|
26
|
+
end
|
22
27
|
end
|
23
28
|
|
24
29
|
def run!
|
@@ -84,7 +89,7 @@ module Phase
|
|
84
89
|
|
85
90
|
def upload_manifest!(manifest_path)
|
86
91
|
manifest = bucket.files.new({
|
87
|
-
key:
|
92
|
+
key: manifest_key,
|
88
93
|
body: ::File.open(manifest_path),
|
89
94
|
acl: "public-read"
|
90
95
|
})
|
data/lib/phase/version.rb
CHANGED