memorack 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +0,0 @@
1
- def update_version(path)
2
- version = `git describe --dirty 2>/dev/null`.chomp
3
- version = `git describe --tags --dirty`.chomp if version.empty?
4
- version[0, 1] = '' if version =~ /^v[0-9]/
5
- version.gsub!(/-([a-z0-9]+(-dirty)?)$/) { |m| "(#{$1})" }
6
-
7
- begin
8
- return if version == open(path).read.chomp
9
- return if version.empty?
10
- rescue
11
- end
12
-
13
- open(path, 'w') { |f| f.puts version }
14
- end
15
-
16
- update_version 'VERSION'