Sha256: 500663a8332041a8fd82e912c0998f6f6b248f8b55b79cd38d0129658dab7d8a

Contents?: true

Size: 865 Bytes

Versions: 37

Compression:

Stored size: 865 Bytes

Contents

module Docman
  module Deployers
    class GitDeployer < Deployer

      register_deployer :git_deployer

      def push
        root = @docroot_config.root
        root.state_name = self['state']
        tag = nil

        if self['environment'].has_key?('tagger')
          filepath = File.join(root['full_build_path'], 'VERSION')
          prev_version = File.file?(filepath) ? File.open(filepath) : nil
          params = self['environment']['tagger']
          params['prev_version'] = prev_version
          version = Docman::Taggers::Tagger.create(params, root, self).perform
          File.open(filepath, 'w') {|f| f.write(version) }
          tag = version
        end

        GitUtil.commit(root['full_build_path'], root['full_build_path'], 'Updated version', tag)
        GitUtil.push(root['full_build_path'], root.version)
      end

    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
docman-0.0.51 lib/docman/deployers/git_deployer.rb
docman-0.0.50 lib/docman/deployers/git_deployer.rb
docman-0.0.49 lib/docman/deployers/git_deployer.rb
docman-0.0.48 lib/docman/deployers/git_deployer.rb
docman-0.0.47 lib/docman/deployers/git_deployer.rb
docman-0.0.46 lib/docman/deployers/git_deployer.rb
docman-0.0.45 lib/docman/deployers/git_deployer.rb
docman-0.0.44 lib/docman/deployers/git_deployer.rb
docman-0.0.43 lib/docman/deployers/git_deployer.rb
docman-0.0.42 lib/docman/deployers/git_deployer.rb
docman-0.0.41 lib/docman/deployers/git_deployer.rb
docman-0.0.40 lib/docman/deployers/git_deployer.rb
docman-0.0.39 lib/docman/deployers/git_deployer.rb
docman-0.0.38 lib/docman/deployers/git_deployer.rb
docman-0.0.37 lib/docman/deployers/git_deployer.rb
docman-0.0.36 lib/docman/deployers/git_deployer.rb
docman-0.0.35 lib/docman/deployers/git_deployer.rb
docman-0.0.34 lib/docman/deployers/git_deployer.rb
docman-0.0.33 lib/docman/deployers/git_deployer.rb
docman-0.0.32 lib/docman/deployers/git_deployer.rb