[rtems-release commit] Add a release-path to the RSB VERSION file. Add better defaults support.
Chris Johns
chrisj at rtems.org
Thu Apr 6 01:03:07 UTC 2017
Module: rtems-release
Branch: master
Commit: ead5f49d8ca253c7ef7d84f048ce9a5bdee9f321
Changeset: http://git.rtems.org/rtems-release/commit/?id=ead5f49d8ca253c7ef7d84f048ce9a5bdee9f321
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Apr 6 11:02:24 2017 +1000
Add a release-path to the RSB VERSION file. Add better defaults support.
---
rtems-release | 40 ++----------
rtems-release-defaults | 75 ++++++++++++++++++++++
rtems-release-docs | 4 +-
rtems-release-kernel | 11 +---
rtems-release-notes | 4 +-
rtems-release-package | 4 +-
...elease-rsb-hashing => rtems-release-rsb-version | 25 +++++---
rtems-release-sources | 9 +--
rtems-release-tag | 8 +--
9 files changed, 111 insertions(+), 69 deletions(-)
diff --git a/rtems-release b/rtems-release
index 3b9fcb2..28c92e3 100755
--- a/rtems-release
+++ b/rtems-release
@@ -37,14 +37,14 @@
echo "RTEMS Release, v0.1"
#
-# Stop on any error
+# Global release top path.
#
-set -e
+export release_top=${PWD}
#
-# Keep the top where we start.
+# Defaults.
#
-top=${PWD}
+. ${release_top}/rtems-release-defaults
#
# The version and revision.
@@ -58,34 +58,6 @@ revision=$2
release=${version}.${revision}
-checksum=sha512
-
-#
-# Defaults.
-#
-rtems_examples=yes
-rtems_libbsd=yes
-rtems_docs=yes
-rtems_docs_build=sphinx
-rtems_release_notes=yes
-rtems_readme=README.txt.in
-rtems_readme_release_notes=
-rtems_release_conf=
-
-#
-# The date stamp
-#
-now=$(date +"%d %B %Y")
-export now
-
-#
-# Version configuration. Overrides defaults.
-#
-if [ -f rtems-release-${version}-conf ]; then
- rtems_release_conf=rtems-release-${version}-conf
- . rtems-release-${version}-conf
-fi
-
build()
{
echo "Package: $1"
@@ -105,7 +77,7 @@ mkdir ${release}
build rtems-source-builder ${version} ${revision}
build rtems-tools ${version} ${revision}
build rtems ${version} ${revision} rtems-release-kernel
-build rtems-source-builder ${version} ${revision} rtems-release-rsb-hashing
+build rtems-source-builder ${version} ${revision} rtems-release-rsb-version
if [ ${rtems_examples} = yes ]; then
build examples-v2 ${version} ${revision}
# Hack around the repo naming.
@@ -170,7 +142,7 @@ for f in README.txt \
rtems-release-package \
rtems-release-package-end \
rtems-release-package-start \
- rtems-release-rsb-hashing \
+ rtems-release-rsb-version \
rtems-release-sources \
rtems-source-packages
do
diff --git a/rtems-release-defaults b/rtems-release-defaults
new file mode 100755
index 0000000..54dc51b
--- /dev/null
+++ b/rtems-release-defaults
@@ -0,0 +1,75 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# RTEMS Release Defaults.
+#
+
+#
+# Stop on any error
+#
+set -e
+
+#
+# Keep the top where we start.
+#
+top=${PWD}
+
+#
+# The default checksum.
+#
+checksum=sha512
+
+#
+# Defaults.
+#
+rtems_examples=yes
+rtems_libbsd=yes
+rtems_docs=yes
+rtems_docs_build=sphinx
+rtems_release_notes=yes
+rtems_readme=README.txt.in
+rtems_readme_release_notes=
+rtems_release_conf=
+rtems_release_url=https://ftp.rtems.org/pub/rtems/releases
+
+#
+# The date stamp
+#
+now=$(date +"%d %B %Y")
+export now
+
+#
+# Version configuration. Overrides defaults.
+#
+if [ -f rtems-release-${version}-conf ]; then
+ rtems_release_conf=rtems-release-${version}-conf
+ . rtems-release-${version}-conf
+fi
diff --git a/rtems-release-docs b/rtems-release-docs
index ff3d4d7..bb57958 100755
--- a/rtems-release-docs
+++ b/rtems-release-docs
@@ -35,9 +35,9 @@
echo "RTEMS Documentation Release builder, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
+. ${release_top}/rtems-release-defaults
#
# Only build if sphinx-build is present on the system.
diff --git a/rtems-release-kernel b/rtems-release-kernel
index 7a521f0..fe67112 100755
--- a/rtems-release-kernel
+++ b/rtems-release-kernel
@@ -35,14 +35,9 @@
echo "RTEMS Release RTEMS Kernel, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
-
-#
-# Keep the top where we start.
-#
-top=${PWD}
+. ${release_top}/rtems-release-defaults
#
# The package, version and revision.
@@ -140,6 +135,6 @@ doxygen Doxyfile
echo "Creating: rtems-doxygen-${release}.tar.xz"
mv cpukit_doxy/html rtems-doxygen-${release}
-tar cf - ${prefix}-doxygen | xz > ../rtems-doxygen-${release}.tar.xz
+tar cf - rtems-doxygen-${release} | xz > ../rtems-doxygen-${release}.tar.xz
exit 0
diff --git a/rtems-release-notes b/rtems-release-notes
index 25f3993..3dee8f7 100755
--- a/rtems-release-notes
+++ b/rtems-release-notes
@@ -35,9 +35,9 @@
echo "RTEMS Release Notes builder, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
+. ${release_top}/rtems-release-defaults
#
# Only build if wkhtmltopdf is present on the system.
diff --git a/rtems-release-package b/rtems-release-package
index 506a13b..c7e0b8c 100755
--- a/rtems-release-package
+++ b/rtems-release-package
@@ -35,9 +35,9 @@
echo "RTEMS Release Package, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
+. ${release_top}/rtems-release-defaults
#
# Common package start.
diff --git a/rtems-release-rsb-hashing b/rtems-release-rsb-version
similarity index 80%
rename from rtems-release-rsb-hashing
rename to rtems-release-rsb-version
index dba488e..5e79f69 100755
--- a/rtems-release-rsb-hashing
+++ b/rtems-release-rsb-version
@@ -33,17 +33,12 @@
# This script adds the hashes to the release packages to the RSB.
#
-echo "RTEMS Release RSB Hashing, v0.1"
+echo "RTEMS Release RSB Versioning, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
-
-#
-# Keep the top where we start.
-#
-top=${PWD}
+. ${release_top}/rtems-release-defaults
#
# The package, version and revision.
@@ -64,7 +59,17 @@ prefix=${package}-${release}
echo "Package: ${package}"
echo "Release: ${release}"
-checksum=md5
+#
+# Set the release path. If an RC release use a subdirectory.
+#
+if [ \( $(echo "${release}" | sed -e 's/.*rc.*/yes/') = "yes" \) -o \
+ \( $(echo "${release}" | sed -e 's/.*RC.*/yes/') = "yes" \) ]; then
+ echo "release_path = ${rtems_release_url}/${version}/rc/${release}/sources" >> ${prefix}/VERSION
+else
+ echo "release_path = ${rtems_release_url}/${version}/${release}/sources" >> ${prefix}/VERSION
+fi
+
+checksum=sha512
#
# Add the hashes for the required packages in the RSB generated during an RTEMS
@@ -79,6 +84,6 @@ do
echo "${file} = ${checksum} ${hash}" >> ${prefix}/VERSION
done
-echo "RSB Hashing complete."
+echo "RSB Versioning complete."
exit 0
diff --git a/rtems-release-sources b/rtems-release-sources
index 55a8ee5..d9e7d6e 100755
--- a/rtems-release-sources
+++ b/rtems-release-sources
@@ -36,14 +36,9 @@
echo "RTEMS Release Sources, v0.1"
#
-# Stop on any error
+# Defaults.
#
-set -e
-
-#
-# Keep the top where we start.
-#
-top=${PWD}
+. ${release_top}/rtems-release-defaults
#
# The version and revision.
diff --git a/rtems-release-tag b/rtems-release-tag
index 9b9077c..408088f 100755
--- a/rtems-release-tag
+++ b/rtems-release-tag
@@ -37,14 +37,14 @@
echo "RTEMS Release, v0.1"
#
-# Stop on any error
+# Global release top path.
#
-set -e
+export release_top=${PWD}
#
-# Keep the top where we start.
+# Defaults.
#
-top=${PWD}
+. ${release_top}/rtems-release-defaults
#
# The user, version and revision.
More information about the vc
mailing list