env_branch 1.2.0 → 1.3.0

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
- SHA1:
3
- metadata.gz: 9b6b06eb812e375407cbaaa09916b26f25288975
4
- data.tar.gz: dad1c22fdf357ddd1aec203fcae7726685de2e89
2
+ SHA256:
3
+ metadata.gz: 273db0da2cdf164e1d8bba261b33cfcd597f0ddf448eae1c39c0754fce6f577d
4
+ data.tar.gz: 9885fef24d256fb384d28fcb9637b90203bff90516b6d30c39e78b527a66c8c3
5
5
  SHA512:
6
- metadata.gz: 288cf9f2b56f0049464f7eef93ac9a966e1cdd28b182edbb88b1badcb680188cd1ce09126ecc4a14804012a9cfd866c040c5d9546e0b9d50b2f4c15598ac50c7
7
- data.tar.gz: 166f559b11e7dc8ec32e9081e3a45d810995f7aefa50436f94326be8ceebaf5a436a57ac124917f54c64263a957f5288617cebbedcf75ab6906856ec41da249d
6
+ metadata.gz: 70d7b9b360e2446ebddefa960ce0df7e41d846625e26ffd27ee6e6d2029f136c6b40eaa6e80537075b249ca7b46fe23b27e9545834bba057117f0ba52ecd8c66
7
+ data.tar.gz: 7898265b787dabc340460e61e73334e95cfb94c3f538904cdae6309199dfb3634cf261afbc80a139d715f88af35168e00cf8ea00cea7bd5e50ec6d11f91afe25
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in env_branch.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rubocop'
6
+ gem 'rubocop' if RUBY_VERSION >= '2.0.0'
7
7
  gem 'byebug' if RUBY_VERSION >= '2.0.0'
8
8
  gem 'parse_gemspec-cli'
9
9
  gem 'yard'
data/README.md CHANGED
@@ -68,6 +68,9 @@ And more *[details][docs-url]*.
68
68
  * CircleCI
69
69
  * `ENV['CIRCLE_BRANCH']`
70
70
  * [Environment variables - CircleCI](https://circleci.com/docs/environment-variables#build-details)
71
+ * Bitrise
72
+ * `ENV['BITRISE_GIT_BRANCH']`
73
+ * [Environment variables - Bitrise](https://devcenter.bitrise.io/faq/available-environment-variables/)
71
74
  * GitHub pull request builder plugin (for Jenkins)
72
75
  * `ENV['ghprbSourceBranch']`
73
76
  * [Environment Variables](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin#GitHubpullrequestbuilderplugin-EnvironmentVariables)
@@ -1,3 +1,13 @@
1
+ <a name="1.3.0"></a>
2
+ # [1.3.0](https://github.com/packsaddle/ruby-env_branch/compare/v1.2.0...v1.3.0) (2018-07-15)
3
+
4
+
5
+ ### Features
6
+
7
+ * **ci:** support bitrise([7a7a24e](https://github.com/packsaddle/ruby-env_branch/commit/7a7a24e))
8
+
9
+
10
+
1
11
  <a name="1.2.0"></a>
2
12
  # [1.2.0](https://github.com/packsaddle/ruby-env_branch/compare/v1.1.0...v1.2.0) (2016-05-07)
3
13
 
@@ -40,6 +40,8 @@ module EnvBranch
40
40
  # ENV['TRAVIS_BRANCH']
41
41
  # circleci.com:
42
42
  # ENV['CIRCLE_BRANCH']
43
+ # bitrise.io:
44
+ # ENV['BITRISE_GIT_BRANCH']
43
45
  # GitHub pull request builder plugin (for Jenkins):
44
46
  # ENV['ghprbSourceBranch']
45
47
  # Git plugin (for Jenkins):
@@ -54,6 +56,8 @@ module EnvBranch
54
56
  # Environment Variables - Travis CI
55
57
  # @see https://circleci.com/docs/environment-variables#build-details
56
58
  # Environment variables - CircleCI
59
+ # @see https://devcenter.bitrise.io/faq/available-environment-variables/
60
+ # Environment variables - Bitrise
57
61
  # @see https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin#GitHubpullrequestbuilderplugin-EnvironmentVariables
58
62
  # Environment Variables
59
63
  # @see https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Environmentvariables
@@ -63,6 +67,8 @@ module EnvBranch
63
67
  ENV['TRAVIS_BRANCH']
64
68
  elsif ENV['CIRCLE_BRANCH'] && !ENV['CIRCLE_BRANCH'].empty?
65
69
  ENV['CIRCLE_BRANCH']
70
+ elsif ENV['BITRISE_GIT_BRANCH'] && !ENV['BITRISE_GIT_BRANCH'].empty?
71
+ ENV['BITRISE_GIT_BRANCH']
66
72
  elsif ENV['ghprbSourceBranch'] && !ENV['ghprbSourceBranch'].empty?
67
73
  ENV['ghprbSourceBranch']
68
74
  elsif ENV['GIT_BRANCH'] && !ENV['GIT_BRANCH'].empty?
@@ -23,10 +23,12 @@ module EnvBranch
23
23
  def stash_env_branch
24
24
  @original_travis_branch = ENV['TRAVIS_BRANCH']
25
25
  @original_circle_branch = ENV['CIRCLE_BRANCH']
26
+ @original_bitrise_branch = ENV['BITRISE_GIT_BRANCH']
26
27
  @original_github_pull_request_builder_plugin_branch = ENV['ghprbSourceBranch']
27
28
  @original_git_plugin_branch = ENV['GIT_BRANCH']
28
29
  ENV.delete 'TRAVIS_BRANCH'
29
30
  ENV.delete 'CIRCLE_BRANCH'
31
+ ENV.delete 'BITRISE_GIT_BRANCH'
30
32
  ENV.delete 'ghprbSourceBranch'
31
33
  ENV.delete 'GIT_BRANCH'
32
34
  end
@@ -50,10 +52,12 @@ module EnvBranch
50
52
  def restore_env_branch
51
53
  original_travis_branch = (defined?(@original_travis_branch) && @original_travis_branch) || nil
52
54
  original_circle_branch = (defined?(@original_circle_branch) && @original_circle_branch) || nil
55
+ original_bitrise_branch = (defined?(@original_bitrise_branch) && @original_bitrise_branch) || nil
53
56
  original_github_pull_request_builder_plugin_branch = (defined?(@original_github_pull_request_builder_plugin_branch) && @original_github_pull_request_builder_plugin_branch) || nil
54
57
  original_git_plugin_branch = (defined?(@original_git_plugin_branch) && @original_git_plugin_branch) || nil
55
58
  ENV['TRAVIS_BRANCH'] = original_travis_branch
56
59
  ENV['CIRCLE_BRANCH'] = original_circle_branch
60
+ ENV['BITRISE_GIT_BRANCH'] = original_bitrise_branch
57
61
  ENV['ghprbSourceBranch'] = original_github_pull_request_builder_plugin_branch
58
62
  ENV['GIT_BRANCH'] = original_git_plugin_branch
59
63
  end
@@ -1,3 +1,3 @@
1
1
  module EnvBranch
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_branch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-07 00:00:00.000000000 Z
11
+ date: 2018-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.5.1
99
+ rubygems_version: 2.7.6
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Get BRANCH_NAME from environment variables.
103
103
  test_files: []
104
- has_rdoc: