-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbump-gem
More file actions
executable file
·48 lines (39 loc) · 949 Bytes
/
Copy pathbump-gem
File metadata and controls
executable file
·48 lines (39 loc) · 949 Bytes
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
#!/usr/bin/env ruby
system("vi lib/rubytext_version.rb +3")
require 'date'
$LOAD_PATH << "./lib"
require "rubytext_version"
today = Date.today.strftime("%Y-%m-%d")
version = RubyText::VERSION
system("git pull")
system("git add lib/rubytext_version.rb")
gs = `git status 2>&1`
if gs =~ /not staged for commit/
puts
puts gs
puts "\n\n Possible bad git status. Continue? (y/n)"
resp = gets.chomp
case resp
when "y"
system("git add -u")
print "Commit message = "
msg = gets.chomp
system("git commit -m '#{msg}' && git push")
puts "Now continuing..."
else # assume "no"
puts "Exiting.\n "
exit
end
else
print "Commit message = "
msg = gets.chomp
system("git commit -m '#{msg}' && git push")
end
update = <<-EOF
gem build rubytext.gemspec &&
gem push rubytext-*.gem &&
gem uninstall -x rubytext &&
gem install rubytext
rm rubytext-*.gem
EOF
system(update)