githubteacher / githubteacher/essentials-aug
Script for updating Submodules
- Lenguaje dominante
- C++
- Estrellas
- 1
- Forks
- 3
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
@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."
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
El issue proporciona un shell script que usa git submodules, on-demand-source, script/build y los directorios generados _site y on-demand, pero no indica ningún archivo de destino ni la integración solicitada. Primero inspecciona la estructura del repositorio y los puntos de entrada existentes para submódulos o para el build; después aclara dónde debe ubicarse el script y verifica que sus pasos de actualización, build, copia y staging produzcan el resultado previsto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- bash, git
- Área
- build-system, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 28/100