From 9fb703ca6b032e6249646886a882bbc171a673a5 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 29 Mar 2012 19:51:13 +0200 Subject: [PATCH] build: strip micro version if minor is even To avoid manually adding the 3.4 stable version when doing the release, check in configure if building a stable (even minor) version and strip micro at that time. --- configure.ac | 8 ++++++++ extension.mk | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2a900839..d23fa803 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,14 @@ PKG_PROG_PKG_CONFIG([0.22]) GLIB_GSETTINGS +SHELL_VERSION="$PACKAGE_VERSION" +shell_major=`echo "$PACKAGE_VERSION" | cut -d'.' -f1` +shell_minor=`echo "$PACKAGE_VERSION" | cut -d'.' -f2` +if test "$(($shell_minor % 2))" -eq 0; then + SHELL_VERSION="$shell_major.$shell_minor" +fi +AC_SUBST([SHELL_VERSION]) + dnl keep this in alphabetic order dnl by default, install only extensions that do not change completely the shell experience, dnl that don't require GSettings and that don't require external packages for typelibs diff --git a/extension.mk b/extension.mk index 05c072c2..1a84f60c 100644 --- a/extension.mk +++ b/extension.mk @@ -11,7 +11,7 @@ metadata.json: metadata.json.in $(top_builddir)/config.status -e "s|[@]uuid@|$(uuid)|" \ -e "s|[@]gschemaname@|$(gschemaname)|" \ -e "s|[@]gettext_domain@|$(GETTEXT_PACKAGE)|" \ - -e "s|[@]shell_current@|$(PACKAGE_VERSION)|" \ + -e "s|[@]shell_current@|$(SHELL_VERSION)|" \ -e "s|[@]url@|$(extensionurl)|" \ $< > $@