From: Eric Wong <e@80x24.org>
To: kcar-public@bogomips.org
Subject: [PATCH] GIT-VERSION-GEN: fix install for non-tag versions
Date: Wed, 14 Jan 2015 08:48:43 +0000 [thread overview]
Message-ID: <20150114084843.GA6083@dcvr.yhbt.net> (raw)
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
reply other threads:[~2015-01-14 8:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/kcar/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150114084843.GA6083@dcvr.yhbt.net \
--to=e@80x24.org \
--cc=kcar-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).