tools/zipme.sh: Let major.minor.patch argument optional
since version.sh can generate this information for us Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
7ffccf738c
commit
0932f08b93
2 changed files with 35 additions and 36 deletions
|
@ -1120,7 +1120,7 @@ zipme.sh
|
||||||
Any VCS files or directories are excluded from the final tarballs.
|
Any VCS files or directories are excluded from the final tarballs.
|
||||||
|
|
||||||
$ ./tools/zipme.sh -h
|
$ ./tools/zipme.sh -h
|
||||||
USAGE="USAGE: ./tools/zipme.sh [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor.patch>"
|
USAGE="USAGE: ./tools/zipme.sh [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] [<major.minor.patch>]"
|
||||||
Examples:
|
Examples:
|
||||||
./tools/zipme.sh -s 9.0.0
|
./tools/zipme.sh -s 9.0.0
|
||||||
Create version 9.0.0 tarballs and sign them.
|
Create version 9.0.0 tarballs and sign them.
|
||||||
|
|
69
tools/zipme.sh
Executable file → Normal file
69
tools/zipme.sh
Executable file → Normal file
|
@ -50,7 +50,7 @@ EXCLPAT="
|
||||||
"
|
"
|
||||||
# Get command line parameters
|
# Get command line parameters
|
||||||
|
|
||||||
USAGE="USAGE: $0 [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor.patch>"
|
USAGE="USAGE: $0 [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] [<major.minor.patch>]"
|
||||||
ADVICE="Try '$0 -h' for more information"
|
ADVICE="Try '$0 -h' for more information"
|
||||||
|
|
||||||
unset VERSION
|
unset VERSION
|
||||||
|
@ -95,14 +95,14 @@ while [ ! -z "$1" ]; do
|
||||||
echo " Enable script debug"
|
echo " Enable script debug"
|
||||||
echo " -h"
|
echo " -h"
|
||||||
echo " show this help message and exit"
|
echo " show this help message and exit"
|
||||||
echo " -e"
|
echo " -e"
|
||||||
echo " Exclude a list of files or folders"
|
echo " Exclude a list of files or folders"
|
||||||
echo " NOTE: The list must be quoted, example -e \"*.out tmp\""
|
echo " NOTE: The list must be quoted, example -e \"*.out tmp\""
|
||||||
echo " -v"
|
echo " -v"
|
||||||
echo " Be verbose. The output could be more than you care to see."
|
echo " Be verbose. The output could be more than you care to see."
|
||||||
echo " -s"
|
echo " -s"
|
||||||
echo " PGP sign the final tarballs and create digests."
|
echo " PGP sign the final tarballs and create digests."
|
||||||
echo " -k"
|
echo " -k"
|
||||||
echo " PGP key ID. If not provided the default ID will be used."
|
echo " PGP key ID. If not provided the default ID will be used."
|
||||||
echo " <major.minor.patch>"
|
echo " <major.minor.patch>"
|
||||||
echo " The NuttX version number expressed as a major, minor and patch number separated"
|
echo " The NuttX version number expressed as a major, minor and patch number separated"
|
||||||
|
@ -119,7 +119,9 @@ done
|
||||||
# The last thing on the command line is the version number
|
# The last thing on the command line is the version number
|
||||||
|
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
VERSIONOPT="-v ${VERSION}"
|
if [ -n ${VERSION} ] ; then
|
||||||
|
VERSIONOPT="-v ${VERSION}"
|
||||||
|
if
|
||||||
|
|
||||||
# Full tar options
|
# Full tar options
|
||||||
|
|
||||||
|
@ -135,15 +137,6 @@ else
|
||||||
TAR+=" -czf"
|
TAR+=" -czf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure we know what is going on
|
|
||||||
|
|
||||||
if [ -z ${VERSION} ] ; then
|
|
||||||
echo "You must supply a version like xx.yy as a parameter"
|
|
||||||
echo $USAGE
|
|
||||||
echo $ADVICE
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the directory we were executed from and were we expect to
|
# Find the directory we were executed from and were we expect to
|
||||||
# see the directories to tar up
|
# see the directories to tar up
|
||||||
|
|
||||||
|
@ -189,16 +182,18 @@ if [ ! -d ${APPSDIR} ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the versioned tarball names
|
# Perform a full clean for the distribution
|
||||||
|
|
||||||
NUTTX_TARNAME=apache-nuttx-${VERSION}-incubating.tar
|
cd ${TRUNKDIR} || \
|
||||||
APPS_TARNAME=apache-nuttx-apps-${VERSION}-incubating.tar
|
{ echo "Failed to cd to ${TRUNKDIR}" ; exit 1 ; }
|
||||||
NUTTX_ZIPNAME=${NUTTX_TARNAME}.gz
|
|
||||||
APPS_ZIPNAME=${APPS_TARNAME}.gz
|
echo "Cleaning the repositories"
|
||||||
NUTTX_ASCNAME=${NUTTX_ZIPNAME}.asc
|
|
||||||
APPS_ASCNAME=${APPS_ZIPNAME}.asc
|
if [ $verbose != 0 ] ; then
|
||||||
NUTTX_SHANAME=${NUTTX_ZIPNAME}.sha512
|
make -C ${NUTTXDIR} distclean
|
||||||
APPS_SHANAME=${APPS_ZIPNAME}.sha512
|
else
|
||||||
|
make -C ${NUTTXDIR} distclean 1>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
# Prepare the nuttx directory
|
# Prepare the nuttx directory
|
||||||
|
|
||||||
|
@ -221,6 +216,12 @@ ${VERSIONSH} ${DEBUG} ${BUILD} ${VERSIONOPT} ${NUTTXDIR}/.version || \
|
||||||
chmod 755 ${NUTTXDIR}/.version || \
|
chmod 755 ${NUTTXDIR}/.version || \
|
||||||
{ echo "'chmod 755 ${NUTTXDIR}/.version' failed"; exit 1; }
|
{ echo "'chmod 755 ${NUTTXDIR}/.version' failed"; exit 1; }
|
||||||
|
|
||||||
|
if [ -z ${VERSION} ] ; then
|
||||||
|
source ${NUTTXDIR}/.version
|
||||||
|
VERSION=${CONFIG_VERSION_STRING}
|
||||||
|
VERSIONOPT="-v ${VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Update the configuration variable documentation
|
# Update the configuration variable documentation
|
||||||
#
|
#
|
||||||
# MKCONFIGVARS=${NUTTXDIR}/tools/mkconfigvars.sh
|
# MKCONFIGVARS=${NUTTXDIR}/tools/mkconfigvars.sh
|
||||||
|
@ -240,18 +241,16 @@ chmod 755 ${NUTTXDIR}/.version || \
|
||||||
# { echo "'chmod 644 ${CONFIGVARHTML}' failed"; exit 1; }
|
# { echo "'chmod 644 ${CONFIGVARHTML}' failed"; exit 1; }
|
||||||
#
|
#
|
||||||
|
|
||||||
# Perform a full clean for the distribution
|
# Create the versioned tarball names
|
||||||
|
|
||||||
cd ${TRUNKDIR} || \
|
NUTTX_TARNAME=apache-nuttx-${VERSION}-incubating.tar
|
||||||
{ echo "Failed to cd to ${TRUNKDIR}" ; exit 1 ; }
|
APPS_TARNAME=apache-nuttx-apps-${VERSION}-incubating.tar
|
||||||
|
NUTTX_ZIPNAME=${NUTTX_TARNAME}.gz
|
||||||
echo "Cleaning the repositories"
|
APPS_ZIPNAME=${APPS_TARNAME}.gz
|
||||||
|
NUTTX_ASCNAME=${NUTTX_ZIPNAME}.asc
|
||||||
if [ $verbose != 0 ] ; then
|
APPS_ASCNAME=${APPS_ZIPNAME}.asc
|
||||||
make -C ${NUTTXDIR} distclean
|
NUTTX_SHANAME=${NUTTX_ZIPNAME}.sha512
|
||||||
else
|
APPS_SHANAME=${APPS_ZIPNAME}.sha512
|
||||||
make -C ${NUTTXDIR} distclean 1>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove any previous tarballs
|
# Remove any previous tarballs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue