[buildbot] phase1: maketag.sh: write version and version.date files as well

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 31 00:19:07 PST 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/8152b08ea6a2d24f4c047ac769e80fe3e10f7c0d

commit 8152b08ea6a2d24f4c047ac769e80fe3e10f7c0d
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Jan 31 09:18:59 2017 +0100

    phase1: maketag.sh: write version and version.date files as well
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase1/maketag.sh | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/phase1/maketag.sh b/phase1/maketag.sh
index 3e49ccb..35c6ee1 100755
--- a/phase1/maketag.sh
+++ b/phase1/maketag.sh
@@ -1,7 +1,8 @@
 #!/usr/bin/env bash
 
-git_author="Release Management"
-git_email="lede-dev at lists.infradead.org"
+git_author="$(git config user.name)"
+git_email="$(git config user.email)"
+gpg_keyid=""
 
 base_url="http://downloads.lede-project.org/releases"
 
@@ -26,7 +27,7 @@ usage() {
 		echo "-e Git email [$git_email]"
 		echo "Override the email used for automated Git commits"
 		echo ""
-		echo "-k GPG key id [none]"
+		echo "-k GPG key id [${gpg_keyid:-none}]"
 		echo "Enable GPG signing of tags with given GPG key id"
 		echo ""
 		echo "-p GPG passphrase file [none]"
@@ -82,6 +83,7 @@ if git rev-parse "v${version}^{tag}" >/dev/null 2>/dev/null; then
 fi
 
 revnum="$(./scripts/getver.sh)"
+epoch="$(./scripts/get_source_date_epoch.sh)"
 
 prev_branch="$(git symbolic-ref -q HEAD)"
 
@@ -136,10 +138,14 @@ sed -e 's!http://downloads.lede-project.org/[^"]*!'"$base_url/$version"'!g' \
 	package/base-files/image-config.in > package/base-files/image-config.tagged && \
 		mv package/base-files/image-config.tagged package/base-files/image-config.in
 
+echo "$revnum" > version && git add version
+echo "$epoch" > version.date && git add version.date
+
 git commit -sm "LEDE v$version: adjust config defaults" \
 	feeds.conf.default \
 	include/version.mk \
-	package/base-files/image-config.in
+	package/base-files/image-config.in \
+	version version.date
 
 
 if [ -n "$gpg_keyid" -a -n "$gpg_passfile" ]; then



More information about the lede-commits mailing list