From 54019ca207e337ba03dc01186d469bd60353675b Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 17 Apr 2016 16:29:19 -0700 Subject: Move $set_version tests to update_versioned_files(). That makes it clearer what of the stuff we do for -v is also done, and what of it is not done, for -r. Change-Id: I23e8e8510f879e7430d2387a772691530fbd2f46 Reviewed-on: https://code.wireshark.org/review/14965 Reviewed-by: Guy Harris --- make-version.pl | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'make-version.pl') diff --git a/make-version.pl b/make-version.pl index 3d0aba4665..aefe7908f7 100755 --- a/make-version.pl +++ b/make-version.pl @@ -508,8 +508,6 @@ sub update_release_notes my $version = ""; my $filepath = "$srcdir/docbook/asciidoc.conf"; - return if (!$set_version); - open(ADOC_CONF, "< $filepath") || die "Can't read $filepath!"; while ($line = ) { # wireshark-version:\[\]=1.9.1 @@ -538,8 +536,6 @@ sub update_debian_changelog my $version = ""; my $filepath = "$srcdir/debian/changelog"; - return if ($set_version == 0); - open(CHANGELOG, "< $filepath") || die "Can't read $filepath!"; while ($line = ) { if ($set_version && CHANGELOG->input_line_number() == 1) { @@ -567,8 +563,6 @@ sub update_automake_lib_releases my $filedir; my $filepath; - return if (!$set_version); - # The Libtool manual says # "If the library source code has changed at all since the last # update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’)." @@ -605,8 +599,6 @@ sub update_cmake_lib_releases my $filedir; my $filepath; - return if (!$set_version); - for $filedir ("epan", "wiretap") { # "wsutil" $contents = ""; $filepath = $filedir . "/CMakeLists.txt"; @@ -633,10 +625,12 @@ sub update_versioned_files &update_cmakelists_txt; &update_configure_ac; &update_config_nmake; - &update_release_notes; - &update_debian_changelog; - &update_automake_lib_releases; - &update_cmake_lib_releases; + if ($set_version) { + &update_release_notes; + &update_debian_changelog; + &update_automake_lib_releases; + &update_cmake_lib_releases; + } } sub new_version_h -- cgit v1.2.1