githubteacher / githubteacher/essentials-aug

Script for updating Submodules

Aperta
#49 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
1
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

@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."
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

La issue fornisce uno shell script che usa git submodules, on-demand-source, script/build e le directory generate _site e on-demand, ma non indica alcun file di destinazione né l'integrazione richiesta. Esamina prima la struttura del repository e gli entry point esistenti per i submodule o la build, quindi chiarisci dove deve essere collocato lo script e verifica che i suoi passaggi di aggiornamento, build, copia e staging producano il risultato previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
bash, git
Ambito
build-system, tooling
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.