githubteacher / githubteacher/essentials-aug
Script for updating Submodules
- Vorherrschende Sprache
- C++
- Sterne
- 1
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
@diarmaidm First, I should say you can really go nuts with these scripts so be sure to check out this article for even more scripting goodness: https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407#.6el38r8bc
Here is the bash script we use to update our submodules - keep in mind that the submodule was already added with `git submodule add ` and we are generating a static copy of the site based on the submodule so depending on your use case you may only need 1/2 of this:
```
#!/bin/sh
echo "==> Update submodules..."
git submodule update --recursive
echo "==> Build the on-demand..."
pushd on-demand-source
# Clean up any existing generated artifacts
rm -rf _site/
# Merge in any master-published changes from the on-demand submodule
git pull origin master:master
# Run a regular build on the kit so we can harvest the output
script/build
popd
echo "==> Copy on-demand module into services-web..."
# Clean up existing kit. Always start fresh.
rm -rf on-demand/
# Copy all the kit from the generated site to the kit static-resources folder
cp -r on-demand-source/_site on-demand
echo "==> Staging updated course for commit..."
# Add submodule, in case it had new commits
git add on-demand-source
# Add the generated and copied static kit
git add -A on-demand
echo "NOTE: Review updated on-demand training, and if satisfied, commit and push."
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Das Issue enthält ein Shell-Skript, das git submodules, on-demand-source, script/build sowie die generierten Verzeichnisse _site und on-demand verwendet, nennt jedoch keine Zieldatei und keine gewünschte Integration. Untersuche zuerst die Struktur des Repositorys und vorhandene Einstiege für Submodule oder den Build, kläre anschließend, wo das Skript hingehört, und überprüfe, dass seine Schritte zum Aktualisieren, Bauen, Kopieren und Stagen das beabsichtigte Ergebnis erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- bash, git
- Bereich
- build-system, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 28/100