diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-28 19:19:16 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-28 19:19:16 +0000 |
commit | 632b3d37736ce0df4f74edb2cdcbb88db4c9e975 (patch) | |
tree | 7b354db4fafe9716fdced4d5431fc9ac05b322a1 /GIT-VERSION-GEN | |
parent | 77cbb5e71e466749f4966ef0caca6a5077ad72c9 (diff) | |
download | dtas-632b3d37736ce0df4f74edb2cdcbb88db4c9e975.tar.gz |
Currently, this allows us to use different manpage paths for the tarball and gem; as gem-man and setup.rb expect different paths for manpages. Additionally, Hoe is designed for Ruby projects. dtas may include Perl/shell/Python/whatever in the future. So use GNU make as it is more suited for language agnosticism.
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-x | GIT-VERSION-GEN | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index df7feb1..dd8ae37 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -3,6 +3,7 @@ # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) CONSTANT = "DTAS::VERSION" RVF = "lib/dtas/version.rb" +GVF = "GIT-VERSION-FILE" DEF_VER = "v0.4.0" vn = DEF_VER @@ -28,4 +29,13 @@ 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 = "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__ |