Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Roqc/dev/tools/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 1 kB image not shown  

Quelle  pin-ci.sh   Sprache: Shell

 
#!/usr/bin/env bash

# Use this script to pin the commit used by the developments tracked by the CI

OVERLAYS="./dev/ci/ci-basic-overlay.sh"

process_development() {
  local DEV=$1
  local REPO_VAR="${DEV}_CI_GITURL"
  local REPO=${!REPO_VAR}
  local BRANCH_VAR="${DEV}_CI_REF"
  local BRANCH=${!BRANCH_VAR}
  if [[ -z "$BRANCH" ]]
  then
    echo "$DEV has no branch set, skipping"
    return 0
  fi
  if [[ $BRANCH =~ ^[a-f0-9]{40}$ ]]
  then
    echo "$DEV is already set to hash $BRANCH, skipping"
    return 0
  fi
  echo "Resolving $DEV as $BRANCH from $REPO"
  local HASH=$(git ls-remote --heads $REPO $BRANCH | cut -f 1)
  if [[ -z "$HASH" ]]
  then
    echo "Could not resolve reference $BRANCH for $DEV (something went wrong), skipping"
    return 0
  fi
  read -p "Expand $DEV from $BRANCH to $HASH? [y/N] " -n 1 -r
  echo
  if [[ $REPLY =~ ^[Yy]$ ]]; then
    # use -i.bak to be compatible with MacOS; see, e.g., https://stackoverflow.com/a/7573438/377022
    sed -i.bak -E "s|project +$DEV +.*|project $DEV '$REPO' '$HASH'|" $OVERLAYS
  fi
}

# Execute the script to set the overlay variables
. $OVERLAYS

for project in ${projects[@]}
do
  process_development $project
done

94%


¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.