Sha256: 345be90fbfa9ddb74b89fe98900c905f1affeee9eba470c2d4147cb8420ed486
Contents?: true
Size: 664 Bytes
Versions: 6
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true require 'travis/cli' module Travis module CLI class Status < RepoCommand description 'checks status of the latest build' on '-x', '--[no-]exit-code', 'sets the exit code to 1 if the build failed' on '-q', '--[no-]quiet', 'does not print anything' on '-p', '--[no-]fail-pending', 'sets the status code to 1 if the build is pending' def run say color(last_build.state, last_build.color), "build ##{last_build.number} %s" unless quiet? exit 1 if exit_code? && last_build.unsuccessful? exit 1 if fail_pending? && last_build.pending? end end end end
Version data entries
6 entries across 6 versions & 1 rubygems