fastlane-plugin-ci_changelog 0.5.6 → 0.5.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
  SHA256:
3
- metadata.gz: f52ebce0dd70e93ac96f3b4657c35605ce07fb7fc2aca8422ad896649f4ff875
4
- data.tar.gz: a0e353bfee554c35beed63132581feb25570ee8d9b3c1f264b0d0600708c4da8
3
+ metadata.gz: 9187cae7e24e9b529f3370beceed5b22f3e07d5c640ec3f957df1eae21518810
4
+ data.tar.gz: fbf76c9d336fda77f48fb7f23314c9e0c2ec388037b804e2afa8c61c6f920ea6
5
5
  SHA512:
6
- metadata.gz: d1fa7f713f838b3fb68dae763554fe1c50bcbc14a26d545d88f201abdb0776f08fce8fe7b92e2fe3294d213ee2a844defb03ba8547d7e95047c55ee4540623c8
7
- data.tar.gz: babd1c34757f6a6a90cb558c177a761d0c59b584d82151103bdf78b8c0c58ff7ecd9abb80b738d7baea2843a95033ba112614725547a92e3a840eed80503cfa8
6
+ metadata.gz: a92bf0405fea2b9b0f087a141ff0bf10c105c5030629668c1619fd2389ce1412e27908fa4eee499e415e89643f84b97c2eaadcad70c02ded5b32b7b9d0465d25
7
+ data.tar.gz: c0a8e9e7ecc5a717ec09ac2862289fe55975f3af74af1faf4e4c25aa08506f779d53df6a65ad2cd197018ba814fdb388475cff320bd7e14c8634d3010057e727
@@ -46,12 +46,12 @@ module Fastlane
46
46
  def self.print_table!
47
47
  data = Actions.lane_context[SharedValues::CICL_CHANGELOG]
48
48
  changelog =
49
- if !data.nil? or !data.empty? or data.size != 0
49
+ if !data.to_s.empty? && data != '[]'
50
50
  JSON.parse(data).each_with_object([]) do |commit, obj|
51
51
  obj << commit.collect { |k, v| "#{k}: #{v}" }.join("\n")
52
52
  end.join("\n\n")
53
53
  else
54
- 'No change'
54
+ 'Not found changelog'
55
55
  end
56
56
 
57
57
  params = {
@@ -75,6 +75,7 @@ module Fastlane
75
75
 
76
76
  build_branch = ENV['GIT_BRANCH']
77
77
  build_number = ENV['BUILD_NUMBER'].to_i
78
+
78
79
  loop do
79
80
  build_url = "#{ENV['JOB_URL']}#{build_number}/api/json"
80
81
  UI.verbose("Fetching changelog #{build_url}")
@@ -93,7 +94,7 @@ module Fastlane
93
94
  UI.verbose("- Status #{build_status}")
94
95
  UI.verbose("- Changelog #{data}")
95
96
 
96
- changelog.concat(data) unless data.empty?
97
+ changelog.concat(data) unless build_status
97
98
 
98
99
  break if build_status == true
99
100
  end
@@ -14,7 +14,8 @@ module Fastlane
14
14
 
15
15
  def self.dump_jenkins_commits(body, branch)
16
16
  json = JSON.parse(body)
17
- result = json['result'] == 'SUCCESS' ? true : false
17
+ UI.verbose("- API Result: #{json['result']}")
18
+ result = json['building'] ? false : (json['result'] == 'SUCCESS')
18
19
 
19
20
  # return if previous build do not equal to current build branch.
20
21
  return [result, []] unless jenkins_use_same_branch?(json, branch)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CiChangelog
3
- VERSION = '0.5.6'.freeze
3
+ VERSION = '0.5.7'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-ci_changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-28 00:00:00.000000000 Z
11
+ date: 2019-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http