[coreboot-gerrit] Change in coreboot[master]: util/release: Update build-release script

Patrick Georgi (Code Review) gerrit at coreboot.org
Tue May 16 10:54:11 CEST 2017


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/19126 )

Change subject: util/release: Update build-release script
......................................................................


util/release: Update build-release script

- Put parameter comments and help text in the same order as the actual
parameters.
- Don't clone a new release tree from coreboot.org if a tree already
exists.
- Change COMMIT_ID parameter from optional to required.  If it was
omitted previously, the head of the master branch would be used.

Change-Id: Ifa434a4911dec777004788e3cf4e3436875d929b
Signed-off-by: Martin Roth <martinroth at google.com>
Reviewed-on: https://review.coreboot.org/19126
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
---
M util/release/build-release
1 file changed, 11 insertions(+), 9 deletions(-)

Approvals:
  Philippe Mathieu-Daudé: Looks good to me, but someone else must approve
  Philipp Deppenwiese: Looks good to me, approved
  build bot (Jenkins): Verified



diff --git a/util/release/build-release b/util/release/build-release
index 895285e..089984b 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -1,8 +1,8 @@
 #!/bin/bash
 # ${VERSION_NAME}: new version name
-# ${GPG_KEY_ID}: gpg key id (if not don't sign)
-# ${USERNAME}: username (if not default to https)
 # ${COMMIT_ID}: commit id (if not master)
+# ${USERNAME}: username (if not default to https)
+# ${GPG_KEY_ID}: gpg key id (if not don't sign)
 VERSION_NAME=$1
 COMMIT_ID=$2
 USERNAME=$3
@@ -16,14 +16,14 @@
 TZ=UTC
 export LC_ALL LANG TZ
 
-if [ -z "$VERSION_NAME" ] || [ "$VERSION_NAME" = "--help" ]; then
-	echo "usage: $0 <version> [commit id] [gpg key id] [username]"
+if [ -z "$VERSION_NAME" ] || [ "$VERSION_NAME" = "--help" ] || [ -z "$COMMIT_ID" ]; then
+	echo "usage: $0 <version> <commit id> [username] [gpg key id]"
 	echo "Tags a new coreboot version and creates a tar archive"
 	echo
 	echo "version:    New version name to tag the tree with"
 	echo "commit id:  check out this commit-id after cloning the coreboot tree"
-	echo "gpg key id: used to tag the version, and generate a gpg signature"
 	echo "username:   clone the tree using ssh://USERNAME - defaults to https://"
+	echo "gpg key id: used to tag the version, and generate a gpg signature"
 	exit 1
 fi
 
@@ -34,10 +34,12 @@
 	exit 1
 fi
 
-if [ -n "${USERNAME}" ]; then
-	git clone "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}"
-else
-	git clone https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}"
+if [ ! -d "coreboot-${VERSION_NAME}" ]; then
+	if [ -n "${USERNAME}" ]; then
+		git clone "ssh://${USERNAME}@review.coreboot.org:29418/coreboot.git" "coreboot-${VERSION_NAME}"
+	else
+		git clone https://review.coreboot.org/coreboot.git "coreboot-${VERSION_NAME}"
+	fi
 fi
 
 cd "coreboot-${VERSION_NAME}" || exit 1

-- 
To view, visit https://review.coreboot.org/19126
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa434a4911dec777004788e3cf4e3436875d929b
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Alexander Couzens <lynxis at fe80.eu>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>



More information about the coreboot-gerrit mailing list