-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
54 lines (47 loc) · 1.52 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
require './lib/icersplicer.rb'
require './lib/version.rb'
VERSION = Icersplicer::VERSION::STRING
Gem::Specification.new do |s|
s.name = 'icersplicer'
s.version = VERSION
s.date = '2016-02-03'
s.summary = "Icersplicer"
s.description = "Text file manipulation similar to UNIX tools like cat / head / tail"
s.authors = ["Brian Hood"]
s.email = '[email protected]'
s.files = ["bin/icersplicer", "lib/icersplicer.rb", "lib/globutils.rb", "lib/version.rb", "examples/keywords.ice",
"examples/keywords-ruby.ice", "examples/files/example_data.sql", "examples/files/voc_dump.sql"]
s.executables = ["icersplicer"]
s.homepage =
'https://github.com/puppetpies/icersplicer'
s.license = 'BSD'
s.add_runtime_dependency "walltime", "~> 0.0.5"
s.add_runtime_dependency "file-tail", "~> 1.1.0"
s.add_runtime_dependency "rainbow", "~> 2.1.0"
end
require 'rubygems/tasks'
Gem::Tasks.new
task :build do
Rake::Task['gem'].invoke
end
# Override standard release task
require 'git'
task :stage do
version = "#{VERSION}"
remote = 'origin'
git = Git.open(".")
git.push(remote, 'stage', true)
end
Rake::Task["release"].clear
task :release do
version = "#{VERSION}"
remote = 'origin'
puts "Creating tag v#{version}"
git = Git.open(".")
git.add_tag("v#{version}")
puts "Pushing tag to #{remote}"
git.push(remote, 'master', true)
Rake::Task['gem'].invoke
gemtask = Gem::Tasks::Push.new
gemtask.push("pkg/icersplicer-#{version}.gem")
end