circleci-coverage_reporter 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/circleci/coverage_reporter.rb +18 -0
- data/lib/circleci/coverage_reporter/runner.rb +3 -2
- data/lib/circleci/coverage_reporter/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: 7fb5a6abc13d97a46e341b9807d964e8ea094c44
|
4
|
+
data.tar.gz: e68b4785ecb56228fc62bfaaf6b77357cb572399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1adb6f7230ed915507682a553cea56ecf46d4576a0d26e7ffd52d2c13edb851126d8184b359064baba1d9e9c2af631529129fc984e0b13876ac77e8078212794
|
7
|
+
data.tar.gz: a601f52a201d5776c5e0a9c650d8a4670983d9e148cc9decbef29dfa653be49ddb4d5be6ea03b783f1cd033b62221e2e6000e38592bc58f538d302dbc40f1c8f
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
-
## 0.
|
7
|
+
## [0.1.1] - 2017-03-12
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- Ignore base_build if it is on master branch
|
11
|
+
|
12
|
+
## 0.1.0 - 2017-03-12
|
8
13
|
### Added
|
9
14
|
|
10
15
|
- Initial release
|
16
|
+
|
17
|
+
[0.1.1]: https://github.com/increments/circleci-coverage_reporter/compare/v0.1.0...v0.1.1
|
@@ -24,6 +24,24 @@ module CircleCI
|
|
24
24
|
# @return [void]
|
25
25
|
def self.run
|
26
26
|
Runner.new.run
|
27
|
+
rescue
|
28
|
+
dump
|
29
|
+
raise
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [void]
|
33
|
+
def self.dump
|
34
|
+
puts <<-EOF
|
35
|
+
CircleCI::CoverageReporter.configure do |config|
|
36
|
+
config.base_revision = '#{configuration.base_revision}'
|
37
|
+
config.current_build_number = '#{configuration.current_build_number}'
|
38
|
+
config.current_revision = '#{configuration.current_revision}'
|
39
|
+
config.previous_build_number = '#{configuration.previous_build_number}'
|
40
|
+
config.repository_name = '#{configuration.repository_name}'
|
41
|
+
config.user_name = '#{configuration.user_name}'
|
42
|
+
config.vcs_type = '#{configuration.vcs_type}'
|
43
|
+
end
|
44
|
+
EOF
|
27
45
|
end
|
28
46
|
end
|
29
47
|
end
|
@@ -21,12 +21,12 @@ module CircleCI
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
# @return [Build]
|
24
|
+
# @return [Build, nil]
|
25
25
|
def base_build
|
26
26
|
@base_build ||= client.single_build(base_build_number)
|
27
27
|
end
|
28
28
|
|
29
|
-
# @return [Build]
|
29
|
+
# @return [Build, nil]
|
30
30
|
def previous_build
|
31
31
|
@previous_build ||= client.single_build(previous_build_number)
|
32
32
|
end
|
@@ -53,6 +53,7 @@ module CircleCI
|
|
53
53
|
|
54
54
|
# @return [Integer, nil]
|
55
55
|
def base_build_number
|
56
|
+
return if client.configuration.base_revision == client.configuration.current_revision
|
56
57
|
@base_build_number ||= client.build_number_by_revision(base_revision, branch: 'master')
|
57
58
|
end
|
58
59
|
end
|