Sha256: aeb5171d5a6b0f8df9e0d94551194635d896a57875e4fa30debff6ce47bab58f

Contents?: true

Size: 961 Bytes

Versions: 4

Compression:

Stored size: 961 Bytes

Contents

# codebuild-notifier
# Copyright © 2018 Adam Alboyadjian <adam@cassia.tech>
# Copyright © 2018 Vista Higher Learning, Inc.
#
# codebuild-notifier is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# codebuild-notifier is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with codebuild-notifier.  If not, see <http://www.gnu.org/licenses/>.

module CodeBuildNotifier
  module Git
    def current_commit
      `git show -s --format='%h|%aN|%aE|%cE|%s'`.chomp.split('|')
    end
    module_function :current_commit
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
codebuild-notifier-0.3.2 lib/codebuild-notifier/git.rb
codebuild-notifier-0.3.1 lib/codebuild-notifier/git.rb
codebuild-notifier-0.3.0 lib/codebuild-notifier/git.rb
codebuild-notifier-0.2.0 lib/codebuild-notifier/git.rb