fastlane-plugin-versioning 0.2.8 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d22c44747f8e3d9338a7377f90bc344dad3911e
4
- data.tar.gz: 06c9ffd07a6c2a7f86eb400fa5bfec446843667e
3
+ metadata.gz: a552dbaf2105a7b0a6775cffe40712d922e2e457
4
+ data.tar.gz: 6b39ce735b8fdaacf22c448d02b638ed4e3bd894
5
5
  SHA512:
6
- metadata.gz: 03b5cbb84251c3ff0002413958d175620f5d5353f6b9c153c4297c6c5b1240fdf313be80ad38eae6eef2c90d0206c9d3f5eaf6dde0765bf9e3abf5947ba053bb
7
- data.tar.gz: b34fd73fee81ab1627b7e55ed471bced112cad1f2005d2aac1d3232431c2c01f018053aa5e276528146d0ba1c1a6feddda219fdb8166e8db5169beb8d9171f63
6
+ metadata.gz: fb5c3c2307f50d26e08aa166d6178ec553fee544a05366adbb8a0d672afa3a62b42efa484a291ca5febb0368570f7ac51c1022987793e3c341a00dd5507250e1
7
+ data.tar.gz: b0b2570d1c3c595e9604ed5661d84388aa2e59d2cab93b763556241547c6fa4915f41dede3e527b356ed3f717a2a96a5865a46660a01a81f161cb56f442529e7
data/README.md CHANGED
@@ -123,7 +123,15 @@ get_info_plist_path(xcodeproj: 'Test.xcodeproj', # optional
123
123
  build_configuration_name: 'Release')
124
124
  ```
125
125
 
126
+ ### ci_build_number
126
127
 
128
+ Get CI system build number. Determined using environment variables defined by CI systems. Supports Jenkins, Travis CI, Circle CI, TeamCity, GoCD, Bamboo, Gitlab CI and Xcode Server. Returns `1` if build number cannot be determined.
129
+
130
+ ```ruby
131
+ increment_build_number_in_plist(
132
+ build_number: ci_build_number
133
+ )
134
+ ```
127
135
 
128
136
  ## Issues and Feedback
129
137
 
@@ -0,0 +1,64 @@
1
+ module Fastlane
2
+ module Actions
3
+ class CiBuildNumberAction < Action
4
+ def self.run(params)
5
+ if ENV.key?('JENKINS_HOME') || ENV.key?('JENKINS_URL')
6
+ return ENV['BUILD_NUMBER']
7
+ end
8
+
9
+ if ENV.key?('TRAVIS')
10
+ return ENV['TRAVIS_BUILD_NUMBER']
11
+ end
12
+
13
+ if ENV.key?('CIRCLECI')
14
+ return ENV['CIRCLE_BUILD_NUM']
15
+ end
16
+
17
+ if ENV.key?('TEAMCITY_VERSION')
18
+ return ENV['BUILD_NUMBER']
19
+ end
20
+
21
+ if ENV.key?('GO_PIPELINE_NAME')
22
+ return ENV['GO_PIPELINE_COUNTER']
23
+ end
24
+
25
+ if ENV.key?('bamboo_buildKey')
26
+ return ENV['bamboo_buildNumber']
27
+ end
28
+
29
+ if ENV.key?('GITLAB_CI')
30
+ return ENV['CI_JOB_ID']
31
+ end
32
+
33
+ if ENV.key?('XCS')
34
+ return ENV['XCS_INTEGRATION_NUMBER']
35
+ end
36
+
37
+ UI.error("Cannot detect current CI build number. Use 1 by default.")
38
+ "1"
39
+ end
40
+
41
+ def self.description
42
+ "Detects current build number defined by CI system"
43
+ end
44
+
45
+ def self.is_supported?(platform)
46
+ true
47
+ end
48
+
49
+ def self.authors
50
+ ["Siarhei Fedartsou"]
51
+ end
52
+
53
+ def self.example_code
54
+ [
55
+ 'ci_build_number'
56
+ ]
57
+ end
58
+
59
+ def self.category
60
+ :building
61
+ end
62
+ end
63
+ end
64
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Versioning
3
- VERSION = "0.2.8"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siarhei Fiedartsou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -75,6 +75,7 @@ files:
75
75
  - LICENSE
76
76
  - README.md
77
77
  - lib/fastlane/plugin/versioning.rb
78
+ - lib/fastlane/plugin/versioning/actions/ci_build_number.rb
78
79
  - lib/fastlane/plugin/versioning/actions/get_app_store_version_number.rb
79
80
  - lib/fastlane/plugin/versioning/actions/get_build_number_from_plist.rb
80
81
  - lib/fastlane/plugin/versioning/actions/get_info_plist_path.rb