From e2ace2d613701f3d4a7c7c202f68d2f193c0a64a Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 12 Sep 2013 16:11:34 -0700 Subject: [PATCH] build: Add 'make printversion' to provide version string BUG: https://bugzilla.samba.org/show_bug.cgi?id=15497 Signed-off-by: Christof Schmitt Reviewed-by: Andrew Bartlett --- Makefile | 4 ++++ wscript | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 09700af32c2..b037c398391 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,10 @@ distcheck: touch .tmplock WAFLOCK=.tmplock $(WAF) distcheck +printversion: + touch .tmplock + WAFLOCK=.tmplock $(WAF) printversion + clean: $(WAF) clean diff --git a/wscript b/wscript index 1eaece558f7..f144d9a421c 100644 --- a/wscript +++ b/wscript @@ -516,6 +516,11 @@ def distcheck(): '''test that distribution tarball builds and installs''' samba_version.load_version(env=None) +def printversion(ctx): + '''print version''' + ver = samba_version.load_version(env=None) + print('Samba Version: ' + ver.STRING_WITH_NICKNAME) + def wildcard_cmd(cmd): '''called on a unknown command''' from samba_wildcard import run_named_build_task