diff --git a/Documentation/components/tools/index.rst b/Documentation/components/tools/index.rst index 6b82fb1f1be..f380acfbe20 100644 --- a/Documentation/components/tools/index.rst +++ b/Documentation/components/tools/index.rst @@ -844,6 +844,28 @@ This has been tested on the SAMA5D3-Xplained board; see `Documentation/platforms/arm/sama5/boards/sama5d3-xplained/README.txt` for more information on how to configure the CDC ECM driver for that board. +nxtagspkgsfetch.sh +------------------ + +This script downloads all NuttX RTOS and Application snapshot packages +from the upstream git repository based on the provided git tags list. +These are NOT official release packages as checksum will differ. +When launched from the local NuttX git repository clone the script will +obtain all available tags to be downloaded, otherwise list of tags needs +to be provided manually (or when just selected tag is required). +This script uses ``wget`` underneath, make sure this tool is installed. +Fetch log file is created with a timestamp in name next to the packages. + +Having all tags packaged is important for changes comparison +between specific versions, testing a specific version, compatibility +checks, searching for a feature introduction timeline, etc. + +Usage: ``./nxtagspkgsfetch.sh [download_path] [tags_list_space_separated]`` + +You can provide optional download path (default ``../../nuttx-packages``) +and tags list to get packages for (default all tags from local git clone). +When providing tags you also need to provide download path. + refresh.sh ---------- diff --git a/tools/nxtagspkgsfetch.sh b/tools/nxtagspkgsfetch.sh new file mode 100755 index 00000000000..5ad89b77785 --- /dev/null +++ b/tools/nxtagspkgsfetch.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# tools/releasesdownloader.sh +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# This simple script uses wget to download all git tags release artifacts. +# At time of 12.10.0 release all rtos and apps downloads take ~4GB in size. +# Non-existent artifacts (HTTP/404 status) will exist but have zero size. +# Useful for testing and comparison between releases. + +VERSION="20251216" +TS=`date +%s` +ARGC=$# +TAGS=`git tag -l` +REL_URL_RTOS="https://github.com/apache/nuttx/archive/refs/tags/" +REL_URL_APPS="https://github.com/apache/nuttx-apps/archive/refs/tags/" +REL_EXT=".tar.gz" +REL_OUT="../../nuttx-packages" +WRKDIR=`pwd` +WGET_FLAGS="-c -nv --show-progress -a wget-$TS.log --retry-on-http-error=503\ + --wait=1 --waitretry=60 --keep-badhash" + +if [ "$1" != "" ]; then REL_OUT=$1; fi +if [ $# -ge 2 ]; then + TAGS="" + while shift && [ -n "$1" ]; do TAGS="$TAGS $1"; done; +fi + +printf "====================================================================\n" +printf " NuttX RTOS and Apps release packages fetch script version $VERSION\n" +printf "====================================================================\n\n" +printf " Usage: $0 [download_path] [tags_list_space_separated]\n\n" +printf " Destination : $REL_OUT.\n" +printf " Git tags : `echo $TAGS|tr -d '\n'`.\n\n" + +wget --version &>/dev/null || { + echo "ERROR: Please install wget to use this script!"; exit 1 +} + +if [ $ARGC -lt 2 ]; then printf "NOTE: Using all tags from current nuttx repo clone.\n"; fi +printf "NOTE: Zero package size = no corresponding tag.\n" +printf "WARNING: This tool may fetch several GB of data!\n\n" +printf "Press Return to continue, Ctrl+C to abort.\n" +read x + +if [ ! -d $REL_OUT ]; then printf "Creating: $REL_OUT.\n\n"; mkdir $REL_OUT; fi +cd $REL_OUT + +set +e +for TAG in $TAGS; do + wget $WGET_FLAGS -O $TAG$REL_EXT $REL_URL_RTOS$TAG$REL_EXT 2>&1 + wget $WGET_FLAGS -O ${TAG%%-*}-apps-${TAG#*-}$REL_EXT $REL_URL_APPS$TAG$REL_EXT 2>&1 +done + +printf "\nDone! Log is at: $REL_OUT/wget-$TS.log.\n" + +cd $WKDIR