Sha256: e55571557e835a517bc8599b5ccd007aed8829cc273cb76215b3d0d4a65583aa

Contents?: true

Size: 1.28 KB

Versions: 36

Compression:

Stored size: 1.28 KB

Contents

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with this
# work for additional information regarding copyright ownership. The ASF
# licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

module Buildr
  module GitAutoVersion
    module ProjectExtension
      include Extension

      before_define do |project|
        unless project.version
          version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
          version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
          project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
        end
      end
    end
  end
end

class Buildr::Project
  include Buildr::GitAutoVersion::ProjectExtension
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
buildr-1.5.0 addon/buildr/git_auto_version.rb
buildr-1.5.0-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.5.0-java addon/buildr/git_auto_version.rb
buildr-1.5.0.dev3-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.5.0.dev3 addon/buildr/git_auto_version.rb
buildr-1.5.0.dev3-java addon/buildr/git_auto_version.rb
buildr-1.5.0.dev2 addon/buildr/git_auto_version.rb
buildr-1.5.0.dev2-java addon/buildr/git_auto_version.rb
buildr-1.5.0.dev2-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.4.25 addon/buildr/git_auto_version.rb
buildr-1.4.25-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.4.25-java addon/buildr/git_auto_version.rb
buildr-1.4.24 addon/buildr/git_auto_version.rb
buildr-1.4.24-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.4.24-java addon/buildr/git_auto_version.rb
buildr-1.4.23 addon/buildr/git_auto_version.rb
buildr-1.4.23-x86-mswin32 addon/buildr/git_auto_version.rb
buildr-1.4.23-java addon/buildr/git_auto_version.rb
buildr-1.4.22 addon/buildr/git_auto_version.rb
buildr-1.4.22-x86-mswin32 addon/buildr/git_auto_version.rb