xcake 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f39de7bfa89b96bd1a3708488d2e1e658dd438e
4
- data.tar.gz: 4fcd070e3ddc8e2e276adc8e17649752efd1269c
3
+ metadata.gz: dd7178c2123a0e99b494a38ceeecf951b2a3ef69
4
+ data.tar.gz: 742d21455bed4535cbd13fb784a899846ff32cd2
5
5
  SHA512:
6
- metadata.gz: 333ded28cd7b249d64ada8eb9e682e644bb240f9a34fa507b936e9562d168d3c7460aea2d578c5dde4a234dd5824e40db590fdb2828fa63c3659700d7ca54697
7
- data.tar.gz: e18c3f87bf41e66205a3bf045c9250d9e46af0c48a267ed9bd625111ed3d59b5869bfb62ab14ccdfceafb8ca70e66f9ce15fb877c59f23b0adf0007f80a0c58f
6
+ metadata.gz: 13704323b6ca0271d5e68feeedceec35c909f161804820b1292c93757a90526ef96c11d5caf5436020e0dc9184a2e33d08bc284b07bb0f4ee28620cf5dbf4512
7
+ data.tar.gz: 49346eb8659f925aa61a7d60bddacab3473352360cc8178cc6444d129e0fe2278554f91cc5a1fb91dd309577209a94904b91d5b7328e4cf9c63fd641e2b754b4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ v0.8.7
2
+ ======
3
+ - Adds ability to specify shell script build phase before all other build phases.
4
+
1
5
  v0.8.5 & v0.8.6
2
6
  ===============
3
7
  - Fixes gem failing to load.
@@ -16,6 +16,25 @@ module Xcake
16
16
  phase
17
17
  end
18
18
 
19
+ # Creates a new Shell Script build phase for the
20
+ # target before all of the other build phases
21
+ #
22
+ # @param [String] name
23
+ # the name to use for the build phase
24
+ #
25
+ # @param [Proc] block
26
+ # an optional block that configures the build phase through the DSL.
27
+ #
28
+ # @return [ShellScriptBuildPhase] the new xcode build phase
29
+ #
30
+ def pre_shell_script_build_phase(name, script, &block)
31
+ phase = ShellScriptBuildPhase.new(&block)
32
+ phase.name = name
33
+ phase.script = script
34
+ pinned_build_phases << phase
35
+ phase
36
+ end
37
+
19
38
  # Creates a new Shell Script build phase for the
20
39
  # target
21
40
  #
@@ -32,6 +32,11 @@ module Xcake
32
32
  #
33
33
  attr_accessor :language
34
34
 
35
+ # @return [Array<BuildPhase>] the list
36
+ # of build phases to place first for the project.
37
+ #
38
+ attr_accessor :pinned_build_phases
39
+
35
40
  # @return [Array<BuildPhase>] the list
36
41
  # of build phases for the project.
37
42
  #
@@ -182,6 +187,7 @@ module Xcake
182
187
  # end
183
188
  #
184
189
  def initialize
190
+ @pinned_build_phases = []
185
191
  @build_phases = []
186
192
  @exclude_files = []
187
193
  @linked_targets = []
@@ -4,7 +4,7 @@ module Xcake
4
4
  #
5
5
  class TargetBuildPhaseGenerator < Generator
6
6
  def self.dependencies
7
- [TargetGenerator, TargetDependencyGenerator]
7
+ [TargetGenerator, TargetDependencyGenerator, TargetFileReferenceGenerator]
8
8
  end
9
9
 
10
10
  def visit_target(target)
@@ -12,6 +12,14 @@ module Xcake
12
12
 
13
13
  native_target = @context.native_object_for(target)
14
14
 
15
+ target.pinned_build_phases.each do |phase|
16
+ EventHooks.run_hook :before_adding_custom_build_phase, phase, target
17
+
18
+ native_build_phase = @context.native_object_for(phase)
19
+ phase.configure_native_build_phase(native_build_phase, @context)
20
+ native_target.build_phases.unshift(native_build_phase)
21
+ end
22
+
15
23
  target.build_phases.each do |phase|
16
24
  EventHooks.run_hook :before_adding_custom_build_phase, phase, target
17
25
 
data/lib/xcake/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xcake
2
- VERSION = '0.8.6'.freeze
2
+ VERSION = '0.8.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Campbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide