diff options
author | Eric Wong <e@80x24.org> | 2015-01-14 08:47:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-14 08:47:35 +0000 |
commit | b51e40ffd82299ace280d085fe65c1f44c8d444e (patch) | |
tree | fba3444fe86a71c55b460771d3a8fbde8dab9425 | |
parent | 7735303b032773000f90ac119999453aa2465af6 (diff) | |
download | kcar-b51e40ffd82299ace280d085fe65c1f44c8d444e.tar.gz |
Oops, we need to continue generating the Makefile snippet.
-rwxr-xr-x | GIT-VERSION-GEN | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index e2057b7..77fdfb1 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -2,6 +2,7 @@ CONSTANT = "Kcar::VERSION" RVF = "lib/kcar/version.rb" DEF_VER = "v0.5.0" +GVF = "GIT-VERSION-FILE" vn = DEF_VER # First see if there is a version file (included in release tarballs), @@ -25,4 +26,14 @@ cur_ruby_version = File.read(RVF) rescue nil if new_ruby_version != cur_ruby_version File.open(RVF, "w") { |fp| fp.write(new_ruby_version) } end +File.chmod(0644, RVF) + +# generate the makefile snippet +new_make_version = "GIT_VERSION = #{vn}\n" +cur_make_version = File.read(GVF) rescue nil +if new_make_version != cur_make_version + File.open(GVF, "w") { |fp| fp.write(new_make_version) } +end +File.chmod(0644, GVF) + puts vn if $0 == __FILE__ |