* [PATCH] GIT-VERSION-GEN: fix install for non-tag versions
@ 2015-01-14 8:48 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-01-14 8:48 UTC (permalink / raw)
To: kcar-public
Oops, we need to continue generating the Makefile snippet.
---
This only affects users installing from git
GIT-VERSION-GEN | 11 +++++++++++
1 file changed, 11 insertions(+)
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__
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-14 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-14 8:48 [PATCH] GIT-VERSION-GEN: fix install for non-tag versions Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/kcar.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).