Procházet zdrojové kódy

Reverting automatic pack index generation.
(packs are still automatically downloaded).

Christophe Favergeon před 3 roky
rodič
revize
4b4c6800c4

+ 2 - 26
.github/workflows/build.yaml

@@ -87,7 +87,7 @@ jobs:
           mkdir -p ~/.arm/Packs/.Web
           wget -O ~/.arm/Packs/.Web/ARM.CMSIS.pdsc https://www.keil.com/pack/ARM.CMSIS.pdsc
           echo "::add-matcher::.github/packchk.json"
-          /bin/bash ./Scripts/git/gen_pack.sh -k
+          /bin/bash ./Scripts/git/gen_pack.sh
           echo "::remove-matcher owner=packchk::"
       
       - name: Archive pack
@@ -108,30 +108,6 @@ jobs:
           tag: ${{ github.ref }}
           overwrite: true
 
-      - name: Generate pack index
-        if: ${{ github.event_name == 'release' }}
-        run: |
-          VERSION=$(sed 's/refs\/tags\/v//' <<< $GITHUB_REF)
-          /bin/bash ./Scripts/git/gen_pack_index.sh ${VERSION} > /tmp/CMSIS-DSP.pidx
-          cp ./build/ARM.CMSIS-DSP.pdsc /tmp/
-          
-      - uses: actions/checkout@v2
-        if: ${{ github.event_name == 'release' }}
-        with:
-          ref: pack-index
-
-      - name: Update pack index
-        if: ${{ github.event_name == 'release' }}
-        run: |
-          RELEASE=$(sed 's/refs\/tags\///' <<< $GITHUB_REF)
-          cp -f /tmp/CMSIS-DSP.pidx .
-          cp -f /tmp/ARM.CMSIS-DSP.pdsc .
-          git config user.name github-actions
-          git config user.email github-actions@github.com
-          git add .
-          git commit -m "Update pack index with release ${RELEASE}"
-          git push
-
       - uses: actions/checkout@v2
         if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
         with:
@@ -153,7 +129,7 @@ jobs:
       - name: Publish documentation
         if: ${{ github.event_name == 'release' }}
         run: |
-          RELEASE=$(sed 's/refs\/tags\///' <<< $GITHUB_REF)
+          RELEASE=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
           rm -rf ${RELEASE}
           mkdir -p ${RELEASE}
           rm -f latest

+ 2 - 3
ARM.CMSIS-DSP.pdsc

@@ -5,9 +5,8 @@
   <description>CMSIS Embedded Compute Library</description>
   <vendor>ARM</vendor>
   <license>LICENSE.txt</license>
-  <url>https://raw.githubusercontent.com/ARM-software/CMSIS-DSP/pack-index/</url>
-  <repository type="git">https://github.com/ARM-software/CMSIS-DSP.git</repository>
-    
+  <url>https://www.keil.com/pack/</url>
+
   <releases>
     <release version="0.0.0">
       Active development ...

+ 7 - 22
Scripts/git/check_links.sh

@@ -4,7 +4,7 @@ DIRNAME=$(dirname $(readlink -f $0))
 DESCRIBE=$(readlink -f ${DIRNAME}/git_describe.sh)
 
 function usage {
-  echo "$(basename $0) [-h|--help] [-f|--format <format>] [-u|--url <url>] [tag-prefix]"
+  echo "$(basename $0) [-h|--help] [-f|--format <format>] [tag-prefix]"
   echo ""
   echo "Arguments:"
   echo "  -h|--help               Print this usage message and exit."
@@ -14,8 +14,6 @@ function usage {
   echo "               dxy        Release notes for Doxygen"
   echo "               html       Release notes for HTML"
   echo "  -p|--pre                Include latest pre-release."
-  echo "  -u|--url <url>          Add url attribute to each release:"
-  echo "                          Placeholders are TAG, VERSION, DATE."
   echo "  tag-prefix              Prefix to filter tags."
   echo ""
 }
@@ -43,14 +41,11 @@ function print_pdsc_head {
 }
 
 function print_pdsc {
-  echo -n "  <release version=\"$1\""
-  if [ -n "$2" ]; then
-    echo -n " date=\"$2\""
-  fi
-  if [ -n "$4" ]; then
-    echo -n " url=\"$4\""
+  if [ -z "$2" ]; then
+    echo "  <release version=\"$1\">"
+  else
+    echo "  <release version=\"$1\" date=\"$2\">"
   fi
-  echo ">"
   echo -e "$3" | \
     sed "s/^/    /" | \
     sed "s/<br>//" | \
@@ -113,7 +108,6 @@ function print_html_tail {
 POSITIONAL=()
 FORMAT="text"
 PRERELEASE=0
-URL=""
 while [[ $# -gt 0 ]]
 do
   key="$1"
@@ -132,11 +126,6 @@ do
       PRERELEASE=1
       shift
     ;;
-    '-u'|'--url')
-      shift
-      URL=$1
-      shift
-    ;;
     *)    # unknown option
       POSITIONAL+=("$1") # save it in an array for later
       shift # past argument
@@ -161,14 +150,10 @@ if [[ $PRERELEASE != 0 ]] && ! git rev-list "${PREFIX}${LATEST}" >/dev/null; the
 fi
 
 for TAG in $TAGS; do
-  TAG="${TAG#refs/tags/}"
-  VERSION="${TAG#${PREFIX}}"
+  TAG="${TAG#refs/tags/}" 
   DESC=$(git tag -l -n99 --format "%(contents)" ${TAG} 2>/dev/null)
   DATE=$(git tag -l -n99 --format "%(taggerdate:short)" ${TAG} 2>/dev/null)
-  if [ -n "$URL" ]; then
-    DLURL=$(TAG=$TAG VERSION=$VERSION DATE=$DATE envsubst <<< $URL)
-  fi
-  print_$FORMAT "${VERSION}" "${DATE}" "${DESC}" "${DLURL}"
+  print_$FORMAT "${TAG#${PREFIX}}" "${DATE}" "${DESC}"       
 done
 
 print_${FORMAT}_tail

+ 1 - 4
Scripts/git/gen_pack.sh

@@ -118,9 +118,6 @@ PACK_DELETE_FILES=""
 # Specify patches to be applied
 PACK_PATCH_FILES=""
 
-# Specify the pack download url pattern
-PACK_URL="https://github.com/ARM-software/CMSIS-DSP/releases/download"
-
 ############ DO NOT EDIT BELOW ###########
 echo Starting CMSIS-Pack Generation: `date`
 # Zip utility check
@@ -187,7 +184,7 @@ last=$(grep -n "</releases>" ${PACK_VENDOR}.${PACK_NAME}.pdsc | cut -d: -f1)
 let first-=1
 let last+=1
 head -n ${first} "./${PACK_VENDOR}.${PACK_NAME}.pdsc" > "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc"
-/bin/bash "${CHANGELOG}" -p -f pdsc -u "${PACK_URL}/\${TAG}/${PACK_VENDOR}.${PACK_NAME}.\${VERSION}.pack"  2>/dev/null | sed "s/^/  /" >> "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc"
+/bin/bash "${CHANGELOG}" -p -f pdsc 2>/dev/null | sed "s/^/  /" >> "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc"
 tail -n +${last} "./${PACK_VENDOR}.${PACK_NAME}.pdsc" | \
   sed -e "s/Cversion=\"[^\"]*\"/Cversion=\"${VERSION}\"/" >> "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc"
 

+ 0 - 13
Scripts/git/gen_pack_index.sh

@@ -1,13 +0,0 @@
-#!/bin/bash
-
-cat <<EOF
-<?xml version="1.0" encoding="UTF-8" ?>
-<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
-  <vendor>ARM</vendor>
-  <url>https://raw.githubusercontent.com/ARM-software/CMSIS-DSP/pack-index/</url>
-  <timestamp>$(date -u +%FT%TZ)</timestamp>
-  <pindex>
-    <pdsc url="https://raw.githubusercontent.com/ARM-software/CMSIS-DSP/pack-index/" vendor="ARM" name="CMSIS-DSP" version="$1"/>
-  </pindex>
-</index>
-EOF

+ 0 - 0
Scripts/git/git-configure.sh