Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brian Dupras
committed
May 27, 2014
1 parent
8747722
commit 99999e1
Showing
3 changed files
with
7 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
.rvmrc | ||
.testrc | ||
.idea/ | ||
pkg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
require 'rubygems/package_task' | ||
require 'fileutils' | ||
require 'bundler' | ||
require 'bundler/gem_tasks' | ||
require 'rake/clean' | ||
CLEAN.include('pkg') | ||
|
||
GEMSPEC = eval(File.read('knife-vsphere.gemspec')) | ||
|
||
spec = Gem::Specification.load(Dir['*.gemspec'].first) | ||
gem = Gem::PackageTask.new(GEMSPEC) | ||
gem.define | ||
|
||
desc "Push gem to rubygems.org" | ||
task :push => :gem do | ||
sh "gem push #{gem.package_dir}/#{gem.gem_file}" | ||
end | ||
|
||
desc "Clean old gem build" | ||
task :clean do | ||
pkg_dir = File.join(File.dirname(__FILE__), 'pkg') | ||
FileUtils.rm_rf(pkg_dir) if Dir.exists? pkg_dir | ||
end | ||
task default: :build |