[Pkg-mozext-commits] [requestpolicy] 10/65: make xpi: unique version number
David Prévot
taffit at moszumanska.debian.org
Fri Mar 25 22:59:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 340e8c5f5ab86d3a975b984ddfd1fe2f294b00b8
Author: Martin Kimmerle <dev at 256k.de>
Date: Sat Jan 9 15:12:41 2016 +0100
make xpi: unique version number
Append an unique string to the version number.
---
Makefile | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Makefile b/Makefile
index d37e5be..09be53a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@
SHELL := /bin/bash
ZIP := zip
+GIT := /usr/bin/git
PREPROCESS := /usr/bin/preprocess --content-types-path build/preprocess-content-types.txt
#-------------------------------------------------------------------------------
@@ -93,6 +94,10 @@ preprocess_args__off_amo :=
preprocess_args__amo := -D AMO
preprocess_args__unit_testing := --keep-lines -D UNIT_TESTING
+unique_version__off_amo := yes
+unique_version__amo := no
+unique_version__unit_testing := yes
+
#-------------------------------------------------------------------------------
# [VARIABLES] this configuration
#-------------------------------------------------------------------------------
@@ -101,6 +106,7 @@ current_build__alias := $(alias__$(BUILD))
current_build__extension_id := $(extension_id__$(BUILD))
current_build__xpi_file := $(xpi_file__$(BUILD))
current_build__preprocess_args := $(preprocess_args__$(BUILD))
+current_build__unique_version := $(unique_version__$(BUILD))
#-------------------------------------------------------------------------------
# [VARIABLES] collect source files
@@ -181,6 +187,13 @@ $(build__copy_files) : $(current_build_dir)/% : $(source_dir)/%
echo 'install.rdf: changing the Extension ID !' ; \
sed -i s/$(off_amo__extension_id)/$(amo__extension_id)/ $@ ; \
fi ; \
+ if [[ "$(current_build__unique_version)" == "yes" ]]; then \
+ echo 'install.rdf: making the version unique !' ; \
+ rev_count=`$(GIT) rev-list HEAD | wc --lines` ; \
+ commit_sha=`$(GIT) rev-parse --short HEAD` ; \
+ unique_suffix=.$${rev_count}.r$${commit_sha} ; \
+ sed -i 's,\(</em:version>\),'$${unique_suffix}'\1,' $@ ; \
+ fi ; \
fi
#-------------------------------------------------------------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list