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.
|
||||
|
||||
$ ./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:
|
||||
./tools/zipme.sh -s 9.0.0
|
||||
Create version 9.0.0 tarballs and sign them.
|
||||
|
|
59
tools/zipme.sh
Executable file → Normal file
59
tools/zipme.sh
Executable file → Normal file
|
@ -50,7 +50,7 @@ EXCLPAT="
|
|||
"
|
||||
# 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"
|
||||
|
||||
unset VERSION
|
||||
|
@ -119,7 +119,9 @@ done
|
|||
# The last thing on the command line is the version number
|
||||
|
||||
VERSION=$1
|
||||
if [ -n ${VERSION} ] ; then
|
||||
VERSIONOPT="-v ${VERSION}"
|
||||
if
|
||||
|
||||
# Full tar options
|
||||
|
||||
|
@ -135,15 +137,6 @@ else
|
|||
TAR+=" -czf"
|
||||
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
|
||||
# see the directories to tar up
|
||||
|
||||
|
@ -189,16 +182,18 @@ if [ ! -d ${APPSDIR} ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Create the versioned tarball names
|
||||
# Perform a full clean for the distribution
|
||||
|
||||
NUTTX_TARNAME=apache-nuttx-${VERSION}-incubating.tar
|
||||
APPS_TARNAME=apache-nuttx-apps-${VERSION}-incubating.tar
|
||||
NUTTX_ZIPNAME=${NUTTX_TARNAME}.gz
|
||||
APPS_ZIPNAME=${APPS_TARNAME}.gz
|
||||
NUTTX_ASCNAME=${NUTTX_ZIPNAME}.asc
|
||||
APPS_ASCNAME=${APPS_ZIPNAME}.asc
|
||||
NUTTX_SHANAME=${NUTTX_ZIPNAME}.sha512
|
||||
APPS_SHANAME=${APPS_ZIPNAME}.sha512
|
||||
cd ${TRUNKDIR} || \
|
||||
{ echo "Failed to cd to ${TRUNKDIR}" ; exit 1 ; }
|
||||
|
||||
echo "Cleaning the repositories"
|
||||
|
||||
if [ $verbose != 0 ] ; then
|
||||
make -C ${NUTTXDIR} distclean
|
||||
else
|
||||
make -C ${NUTTXDIR} distclean 1>/dev/null
|
||||
fi
|
||||
|
||||
# Prepare the nuttx directory
|
||||
|
||||
|
@ -221,6 +216,12 @@ ${VERSIONSH} ${DEBUG} ${BUILD} ${VERSIONOPT} ${NUTTXDIR}/.version || \
|
|||
chmod 755 ${NUTTXDIR}/.version || \
|
||||
{ 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
|
||||
#
|
||||
# MKCONFIGVARS=${NUTTXDIR}/tools/mkconfigvars.sh
|
||||
|
@ -240,18 +241,16 @@ chmod 755 ${NUTTXDIR}/.version || \
|
|||
# { echo "'chmod 644 ${CONFIGVARHTML}' failed"; exit 1; }
|
||||
#
|
||||
|
||||
# Perform a full clean for the distribution
|
||||
# Create the versioned tarball names
|
||||
|
||||
cd ${TRUNKDIR} || \
|
||||
{ echo "Failed to cd to ${TRUNKDIR}" ; exit 1 ; }
|
||||
|
||||
echo "Cleaning the repositories"
|
||||
|
||||
if [ $verbose != 0 ] ; then
|
||||
make -C ${NUTTXDIR} distclean
|
||||
else
|
||||
make -C ${NUTTXDIR} distclean 1>/dev/null
|
||||
fi
|
||||
NUTTX_TARNAME=apache-nuttx-${VERSION}-incubating.tar
|
||||
APPS_TARNAME=apache-nuttx-apps-${VERSION}-incubating.tar
|
||||
NUTTX_ZIPNAME=${NUTTX_TARNAME}.gz
|
||||
APPS_ZIPNAME=${APPS_TARNAME}.gz
|
||||
NUTTX_ASCNAME=${NUTTX_ZIPNAME}.asc
|
||||
APPS_ASCNAME=${APPS_ZIPNAME}.asc
|
||||
NUTTX_SHANAME=${NUTTX_ZIPNAME}.sha512
|
||||
APPS_SHANAME=${APPS_ZIPNAME}.sha512
|
||||
|
||||
# Remove any previous tarballs
|
||||
|
||||
|
|
Loading…
Reference in a new issue