heroku_hatchet 4.1.0 → 4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfb6c64e1ff612534d992f0c81cbf4f7e5aa24d23dcb83ec084b345a777f1c5e
4
- data.tar.gz: 8f17c2ebb7bea2bcb22a27b1a134637a19e444a08ba5860db2f3dc344ae0203d
3
+ metadata.gz: 879f4df69cef6001a414901541ac22e24ab72d4011c2c51f8e3af60bf32e6a1c
4
+ data.tar.gz: a70a7755b68c22722e77467dfbffcbae34fe37e7252ee8e252f096f1ef8f00e5
5
5
  SHA512:
6
- metadata.gz: 3816f55ea5995623c5067e08c473a12a8370e492d712de659b1b846287df77d87c841f91426dd2dec9fedd3f2fd27609871a777f6eb4d59875b0aaa9f2546878
7
- data.tar.gz: c321280743113a3b2226f9329e8fb66deb03e82a6ea2389a620ce57b63789184f576792fbe6773d2be013a190833e29af4ae95078ac20dd71f299ac9e6f0aac1
6
+ metadata.gz: eccbe2d8e66399f5a8cb0e619299ee27200fd74ff1c2de6a71dfdb8059891a4d7a21e0c95edae43218184fa816af23ec326da70f67da9828755d17e4a8274f56
7
+ data.tar.gz: aece0edf868b9737db650eb2815b7cb2929c4b7b5fc5847d3016289e3d0db55a63f8985cfb0bccefd90c7e1b7a1b0db56d4dd795a155223d72f7ec6d5d7ba24c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 4.1.1
4
+
5
+ - Fix branch resolution on Travis when a pull-request is tested (https://github.com/heroku/hatchet/pull/70)
6
+
3
7
  ## 4.1.0
4
8
 
5
9
  - Fix CI 403 errors caused by Heroku auto deleting pipelines that do not have an app attached (https://github.com/heroku/hatchet/pull/68)
data/lib/hatchet.rb CHANGED
@@ -26,7 +26,12 @@ module Hatchet
26
26
  Runner = Hatchet::GitApp
27
27
 
28
28
  def self.git_branch
29
+ # TRAVIS_BRANCH works fine unless the build is a pull-request. In that case, it will contain the target branch
30
+ # not the actual pull-request branch! TRAVIS_PULL_REQUEST_BRANCH contains the correct branch but will be empty
31
+ # for push builds. See: https://docs.travis-ci.com/user/environment-variables/
32
+ return ENV['TRAVIS_PULL_REQUEST_BRANCH'] if ENV['TRAVIS_PULL_REQUEST_BRANCH'] && !ENV['TRAVIS_PULL_REQUEST_BRANCH'].empty?
29
33
  return ENV['TRAVIS_BRANCH'] if ENV['TRAVIS_BRANCH']
34
+
30
35
  out = `git describe --contains --all HEAD`.strip
31
36
  raise "Attempting to find current branch name. Error: Cannot describe git: #{out}" unless $?.success?
32
37
  out
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-31 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api