diff options
author | Eric Wong <normalperson@yhbt.net> | 2015-01-14 22:16:44 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2015-01-14 22:16:44 +0000 |
commit | b5fa71328e8871b3ab81a02a3d3166814798d10b (patch) | |
tree | ebceec21112f8f496027fef22a3e835ce203a3c4 /GIT-VERSION-GEN | |
parent | 591e1dd6c31777c627242064accf6e6f2da067a0 (diff) | |
download | mogilefs-client-b5fa71328e8871b3ab81a02a3d3166814798d10b.tar.gz |
The documentation (and website) uses olddoc, now, allowing faster load times and more consistent user experience across different browsers, particularly text-only ones. The packaging is also updated to be consistent with the rest of the projects I deal with.
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-x | GIT-VERSION-GEN | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index fc89e39..06b78f8 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,6 +1,7 @@ #!/usr/bin/env ruby CONSTANT = "MogileFS::VERSION" RVF = "lib/mogilefs/version.rb" +GVF = "GIT-VERSION-FILE" DEF_VER = "v3.7.1" vn = DEF_VER @@ -20,9 +21,19 @@ if File.exist?(".git") end vn = vn.sub!(/\Av/, "") -new_ruby_version = "#{CONSTANT} = '#{vn}'\n" +new_ruby_version = "#{CONSTANT} = '#{vn}' # :nodoc:\n" 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__ |