Welcome to mirror list, hosted at ThFree Co, Russian Federation.

publish_contract_helper.rb « helpers « provider « contracts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 102a73d87ee292dd884604902be1623c13f56279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Provider
  module PublishContractHelper
    PROVIDER_VERSION = ENV['GIT_COMMIT'] || `git rev-parse --verify HEAD`.strip
    PROVIDER_BRANCH = ENV['GIT_BRANCH'] || `git name-rev --name-only HEAD`.strip
    PUBLISH_FLAG = true

    def self.publish_contract_setup
      @setup ||= -> {
        app_version PROVIDER_VERSION
        app_version_branch PROVIDER_BRANCH
        publish_verification_results PUBLISH_FLAG
      }
    end
  end
end