summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2015-06-16 22:34:44 (GMT)
committerVivek Dasmohapatra <vivek@collabora.co.uk>2015-06-16 22:34:44 (GMT)
commitc2ec2281938a739d94ea48fb3f2ff29dc8818dfd (patch)
tree9fa8dd20e98a7b7d2c17542b7ca2e8d99abd317e
parent107a00f17388d945f59450a5e9ed6057ee8a954f (diff)
downloadmisc-scripts-c2ec2281938a739d94ea48fb3f2ff29dc8818dfd.tar.gz
misc-scripts-c2ec2281938a739d94ea48fb3f2ff29dc8818dfd.tar.xz
Include the date and the git commit hash in the package version if available
-rwxr-xr-xsteamos-kernel-package-update4
1 files changed, 3 insertions, 1 deletions
diff --git a/steamos-kernel-package-update b/steamos-kernel-package-update
index 0ccd5fc..477561a 100755
--- a/steamos-kernel-package-update
+++ b/steamos-kernel-package-update
@@ -116,6 +116,8 @@ munge_rules_file ()
get_git_kernel_ver ()
{
kernel_ver=$(cd $1 && make -f <(git show $2:Makefile) kernelversion);
+ kernel_ver=${kernel_ver}+$(date +'%Y%m%d');
+ kernel_ver=${kernel_ver}+$(cd $1 && git rev-list -n 1 --abbrev-commit $2);
}
# build a source package from an unpacked debian source tree:
@@ -266,7 +268,7 @@ if [ -d $repo ];
then
progress "Extracting new upstream source from $repo @ $tree";
git archive --remote=$repo --format=tar --prefix=upstream/ $tree | tar -xf -
- kernel_ver=$(cd upstream/ && make kernelversion);
+ get_git_kernel_ver $repo $tree;
mv upstream $package-$kernel_ver;
else
progress "Unpacking upstream tarball $repo";