Sha256: aaea6098a8496f4ce143f7b4d93b420fedcd0b7e63cef8c0f9020840ae121911

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

require 'rspec/core/rake_task'
require "bundler/gem_tasks"
require "fileutils"
require './lib/flok'

# Default directory to look in is `/specs`
# Run with `rake spec`
RSpec::Core::RakeTask.new(:spec)

#Gem things
#############################################################################
#Upgrade version of gem
def upgrade_version
  versionf = './lib/flok/version.rb'
  require versionf

  #Upgrade version '0.0.1' => '0.0.2'
  version = Flok::VERSION
  new_version = version.split(".")
  new_version[2] = new_version[2].to_i + 1
  new_version = new_version.join(".")

  sreg = "s/#{version}/#{new_version}/"
  puts `sed #{sreg} #{versionf} > tmp; cp tmp #{versionf}`
  `rm tmp`

  return new_version
end

task :push do
  version = upgrade_version
  `git add .`
  `git commit -a -m 'gem #{version}'`
  `git push`
  `git tag #{version}`
  `git push origin #{version}`
  `gem build flok.gemspec`
  `gem push flok-#{version}.gem`
  `rm flok-#{version}.gem`
end
#############################################################################

#Compliation
#############################################################################
task :build_world do
  #What platform are we working with?
  raise "No $PLATFORM given" unless platform = ENV["PLATFORM"]
  build_path = "./products/#{platform}"

  Flok.build_world(build_path, platform)
end
#############################################################################

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flok-0.0.12 Rakefile