lib/appversion/ci.rb in overview-0.0.2.43 vs lib/appversion/ci.rb in overview-0.0.3.pre.debug.51
- old
+ new
@@ -2,18 +2,20 @@
class CI
DEFAULT_BUILD_NO = '1'
def self.tagged_build?
- !ENV['TRAVIS_TAG'].nil?
+ p "TRAVIS_TAG=#{ENV['TRAVIS_TAG']}"
+ travis_tag = ENV['TRAVIS_TAG'] || ''
+ !travis_tag.empty? && !travis_tag == 'EMPTY' #magic default value used by legacy build scripts
end
def self.build_no
ENV["TRAVIS_BUILD_NUMBER"] || ENV["CIRCLE_BUILD_NUM"] || DEFAULT_BUILD_NO
end
def self.branch
- ENV['TRAVIS_REPO_SLUG'] || ENV['CIRCLE_PROJECT_REPONAME']
+ ENV['TRAVIS_BRANCH'] || ENV['CIRCLE_BRANCH']
end
def self.repo
ENV['TRAVIS_REPO_SLUG'] || ENV['CIRCLE_PROJECT_REPONAME']
end
\ No newline at end of file