Class: Jammer::PackagePublisher

Inherits:
Object
  • Object
show all
Defined in:
lib/jammer/package_publisher.rb

Instance Method Summary collapse

Instance Method Details

#publish_package(package_location, package_info, repository = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/jammer/package_publisher.rb', line 6

def publish_package(package_location, package_info, repository = nil)
  tag_name = "#{package_info.name}-v#{package_info.version}"
  tag_message = "#{package_info.name} version #{package_info.version}"
  repository_string = repository ? " --repository #{repository}" : ''
  puts 'Compiling coffeescript...'
  `coffee -c --output #{package_location} #{package_location}/src`

  puts `jam publish --no-auth #{package_location}#{repository_string}`
  puts "Creating tag: #{tag_name}"
  `git tag -a #{tag_name} -m '#{tag_message}'`
  puts `git push --tags`
end