Sha256: bb6bd86e0b65d8a6b2b1c96e6c210f99821b72ac662ef02bf937fe4c6f3d04fc

Contents?: true

Size: 727 Bytes

Versions: 2

Compression:

Stored size: 727 Bytes

Contents

module Overview

  class CI
    DEFAULT_BUILD_NO = '1'

    def self.tagged_build?(travis_tag='')
      p "TRAVIS_TAG=#{ENV['TRAVIS_TAG']}"
      travis_tag = !travis_tag.empty? ? travis_tag : ENV['TRAVIS_TAG'] || ''
      p "travis_tag=#{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_BRANCH'] || ENV['CIRCLE_BRANCH']
    end

    def self.repo
      ENV['TRAVIS_REPO_SLUG'] || ENV['CIRCLE_PROJECT_REPONAME']
    end

    def self.version_suffix
      ENV['VERSION_SUFFIX'] || ''
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
overview-0.0.3.61 lib/appversion/ci.rb
overview-0.0.3.56 lib/appversion/ci.rb