Przeglądaj źródła

PkgC: Add update-llpkgc script

Vito Gamberini 1 rok temu
rodzic
commit
ff79e60dd0

+ 34 - 0
Utilities/Scripts/update-llpkgc.bash

@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+# Note: llpkgc *generates* a parser, thus this script requires npm be available
+
+set -e
+set -x
+shopt -s dotglob
+
+readonly name="llpkgc"
+readonly ownership="llpkgc upstream <[email protected]>"
+readonly subtree="Utilities/cmllpkgc"
+readonly repo="https://gitlab.kitware.com/utils/llpkgc.git"
+readonly tag="7958a1de42b9eec04676d547f6fcf5daa425fbcc"
+readonly shortlog=false
+readonly paths="
+  bin
+  src
+  *.json
+"
+
+extract_source() {
+  git_archive
+  npm install
+  npm run build
+  mv build/llpkgc/* "${extractdir}/${name}-reduced"
+
+  pushd "${extractdir}/${name}-reduced"
+  rm CMakeLists.txt *.json
+  rm -rf src bin
+  echo "* -whitespace" > .gitattributes
+  popd
+}
+
+. "${BASH_SOURCE%/*}/update-third-party.bash"

+ 14 - 0
Utilities/cmllpkgc/README.rst

@@ -0,0 +1,14 @@
+llpkgc
+******
+
+This code is generated by the upstream llpkgc repository located at:
+https://gitlab.kitware.com/utils/llpkgc
+
+Generally, updates to llpkgc should be made in the upstream utilities library
+unless they are exceptionally specific to CMake itself.
+
+The upstream repository does not vendor a generated copy of the parser, so
+the associated update script for this dependency runs the generator and
+vendors it appropriately. This requires a reasonably up-to-date version of
+npm be available in addition to the normal 3rd-party update tooling
+requirements.