soywiki 0.1.6 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +16 -0
- data/lib/soywiki.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -13,8 +13,24 @@ Bundler::GemHelper.install_tasks
|
|
13
13
|
desc "release and build and push new website"
|
14
14
|
task :push => [:release, :build_webpage]
|
15
15
|
|
16
|
+
desc "Bumps version number up one and git commits"
|
17
|
+
task :bump do
|
18
|
+
basefile = "lib/soywiki.rb"
|
19
|
+
file = File.read(basefile)
|
20
|
+
oldver = file[/VERSION = '(\d.\d.\d)'/, 1]
|
21
|
+
newver_i = oldver.gsub(".", '').to_i + 1
|
22
|
+
newver = ("%.3d" % newver_i).split(//).join('.')
|
23
|
+
puts oldver
|
24
|
+
puts newver
|
25
|
+
puts "Bumping version: #{oldver} => #{newver}"
|
26
|
+
newfile = file.gsub("VERSION = '#{oldver}'", "VERSION = '#{newver}'")
|
27
|
+
File.open(basefile, 'w') {|f| f.write newfile}
|
28
|
+
`git commit -am 'Bump'`
|
29
|
+
end
|
30
|
+
|
16
31
|
desc "build and push website"
|
17
32
|
task :web => :build_webpage do
|
33
|
+
"Building and pushing website"
|
18
34
|
`scp website/soywiki.html zoe2@instantwatcher.com:~/danielchoi.com/public/software/`
|
19
35
|
end
|
20
36
|
|
data/lib/soywiki.rb
CHANGED