summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2012-12-25 19:35:12 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2012-12-25 19:35:12 +0200
commit2bd842e2cee0023c9ac4a726a5b1458581656056 (patch)
tree29fbed081371cc5874531a4a2925863626487442
parent4272a1820838625ff08632b0841f35a5d586288f (diff)
downloadgrub-2bd842e2cee0023c9ac4a726a5b1458581656056.tar.gz
Refactor GRUB CI scripts
-rwxr-xr-xgrub-pkg.sh10
-rwxr-xr-xgrub.sh16
2 files changed, 13 insertions, 13 deletions
diff --git a/grub-pkg.sh b/grub-pkg.sh
index 0f1f4a7..75c4859 100755
--- a/grub-pkg.sh
+++ b/grub-pkg.sh
@@ -9,14 +9,14 @@ packaging_dir=grub/debian
packaging_repository=git://git.linaro.org/ci/grub.git
packaging_commit=`cd grub && git log -n1 --pretty=format:%h`
-bzr_commit=`bzr revno ${pkg_repository}`
-if [ -z "${bzr_commit}" ]; then
- echo "Invalid bzr revision: ${bzr_commit}" >&2
+scm_commit=`bzr revno ${pkg_repository}`
+if [ -z "${scm_commit}" ]; then
+ echo "Invalid bzr revision: ${scm_commit}" >&2
exit 1
fi
base_version=2.00
-pkg_version=${base_version}+bzr${bzr_commit}+`date +%Y%m%d`
+pkg_version=${base_version}+bzr${scm_commit}+`date +%Y%m%d`
pkg_dir=${pkg_source}-${pkg_version}
tar -jxf ${pkg_source}_${pkg_version}.orig.tar.bz2
@@ -32,7 +32,7 @@ ${pkg_source} (${pkg_version}-0linaro1) ${distribution}; urgency=low
* CI - ${pkg_source} snapshot:
- repository: ${pkg_repository}
- - commit: ${bzr_commit}
+ - commit: ${scm_commit}
- build: ${BUILD_URL}
- debian/ repository: ${packaging_repository}
diff --git a/grub.sh b/grub.sh
index 0d9927c..c872ac5 100755
--- a/grub.sh
+++ b/grub.sh
@@ -8,6 +8,14 @@ set -e
pkg_source=linaro-grub
pkg_repository=http://bazaar.launchpad.net/~leif-lindholm/linaro-grub/arm-uboot
+if [ -z "${WORKSPACE}" ]; then
+ # Local build
+ export WORKSPACE=`pwd`
+ export BUILD_NUMBER=1
+ # Get the sources
+ bzr branch --use-existing-dir ${pkg_repository} .
+fi
+
bzr_commit=`bzr revno ${pkg_repository}`
if [ -z "${bzr_commit}" ]; then
echo "Invalid bzr revision: ${bzr_commit}" >&2
@@ -18,14 +26,6 @@ base_version=2.00
pkg_version=${base_version}+bzr${bzr_commit}+`date +%Y%m%d`
pkg_dir=${pkg_source}-${pkg_version}
-if [ -z "${WORKSPACE}" ]; then
- # Local build
- export WORKSPACE=`pwd`
- export BUILD_NUMBER=1
- # Get the sources
- bzr branch --use-existing-dir ${pkg_repository} .
-fi
-
# Create source tarball
bzr export --root=${pkg_dir} ${pkg_source}_${pkg_version}.orig.tar.bz2