sbbuild 1.0.0 → 1.0.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sbuild/version.rb +1 -1
  3. data/lib/sbuild.rb +32 -32
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14bc45c4d2f6f64cdee5505d9fce883aab2650eaccbab14c00cf5cbf1cccb4ed
4
- data.tar.gz: 9429c3fcc728f2f3d1d187d447337eb3ea37aa6cf13741bb9695fc388a4ad204
3
+ metadata.gz: d8271638a15d211ff9e23c19302b4598aceedf10933fa64d1e49fea5468145f4
4
+ data.tar.gz: 673cc69b077ae71652922c6cdfda09407f39e5853e396a1683ec633887261455
5
5
  SHA512:
6
- metadata.gz: 100d6bd93b9308a5c671f04e96138b6c9bf32ce8404390bea5c37004ede810a84582084e65428839b6aca40220f990ccb458c6968cd939f052e341ff2a610827
7
- data.tar.gz: 733380e50d2603f8170dd31a1292eb87d1ad07d72089f0b333fc8dc5671ebfaaca79e3d6d2e95ea945930fad0ed7ad77227ddab3d66bb0d8da8c937d9a945c57
6
+ metadata.gz: 98677dea8e9f00d7816fb41adbd01c20bde5bdedceacac5d770f78eb01d1655234f5d8a08e1871c0362a3678ad312073b9a0a2aabc68472c371e12db406e450a
7
+ data.tar.gz: 0cc2264ad78b3d3072c4c02c4b47afbc02f93dbe0604249e848c9474b6bf64dad928441a9f94c31cf4b43c051a0b0b25d2f484078b1bf16afa878e3ce67c006c
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sbuild
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
data/lib/sbuild.rb CHANGED
@@ -579,40 +579,40 @@ class CacheManager
579
579
  end
580
580
 
581
581
 
582
- def project_task_end
582
+ def project_task_end
583
583
 
584
- projects = get_projects
585
- post_targets_context = {}
586
- total_add_count = 0
587
-
588
- projects.each do |project|
589
- project.native_targets.each do | target |
590
- target_context_file = "#{project.path}/#{target.name}.#{FILE_NAME_TARGET_CONTEXT}"
591
- if can_cache_target(target)
592
- if File.exist? target_context_file
593
- post_targets_context = YAML.load(File.read(target_context_file))
584
+ projects = get_projects
585
+ post_targets_context = {}
586
+ total_add_count = 0
587
+
588
+ projects.each do |project|
589
+ project.native_targets.each do | target |
590
+ target_context_file = "#{project.path}/#{target.name}.#{FILE_NAME_TARGET_CONTEXT}"
591
+ if can_cache_target(target)
592
+ if File.exist? target_context_file
593
+ post_targets_context = YAML.load(File.read(target_context_file))
594
+ end
595
+ next unless post_targets_context[:target_status] != CACHE_STATUS_HIT
596
+
597
+ source_files = get_target_source_files(target)
598
+ target_md5_content = generate_target_all_infomation(project, target, source_files)
599
+ next unless target_md5_content && target_md5_content.length > 0
600
+
601
+ cur_target_md5 = Digest::MD5.hexdigest(target_md5_content)
602
+
603
+ post_targets_context[:target_md5] = cur_target_md5
604
+
605
+ if add_cache(target, post_targets_context)
606
+ puts "<INFO> #{target} is being added to cache dir"
607
+ total_add_count = total_add_count + 1
608
+ target.build_phases.delete_if { |phase|
609
+ phase.class == Xcodeproj::Project::Object::PBXShellScriptBuildPhase and phase.name.include? "ys_"
610
+ }
611
+ end
612
+ end
594
613
  end
595
- next unless post_targets_context[:target_status] != CACHE_STATUS_HIT
596
-
597
- source_files = get_target_source_files(target)
598
- target_md5_content = generate_target_all_infomation(project, target, source_files)
599
- next unless target_md5_content && target_md5_content.length > 0
600
-
601
- cur_target_md5 = Digest::MD5.hexdigest(target_md5_content)
602
-
603
- post_targets_context[:target_md5] = cur_target_md5
604
-
605
- if add_cache(target, post_targets_context)
606
- puts "<INFO> #{target} is being added to cache dir"
607
- total_add_count = total_add_count + 1
608
- target.build_phases.delete_if { |phase|
609
- phase.class == Xcodeproj::Project::Object::PBXShellScriptBuildPhase and phase.name.include? "ys_"
610
- }
611
- end
612
- end
614
+ restore_project(project)
613
615
  end
614
- restore_project(project)
616
+ puts "<INFO> total add cache count: #{total_add_count}"
615
617
  end
616
- puts "<INFO> total add cache count: #{total_add_count}"
617
- end
618
618
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yusheng