PrepareEOLE241 » Historique » Version 2
Version 1 (Daniel Dehennin, 26/08/2014 13:13) → Version 2/3 (Daniel Dehennin, 26/08/2014 13:16)
{{toc}}
h1. Préparer un dépôt pour EOLE 2.4.1
Rappel il ne faut jamais fusionner une branche d’une version supérieure à une version inférieure, par exemple : inférieure :
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge master
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.1
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge 2.4.2/master
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.2
</pre>
h2. Isoler EOLE 2.4.0
h3. Code source
Il faut créer une branche d’intégration des correctifs dédiées à EOLE 2.4.0 :
<pre>
moi@work:~/src/$PAQUET (master)$ git branch 2.4.0/master master
moi@work:~/src/$PAQUET (master)$ git push -u origin 2.4.0/master
moi@work:~/src/$PAQUET (master)$ git branch -a
2.3
2.4.0/master
dist/ubuntu/lucid/master
dist/ubuntu/precise/master
* master
remotes/origin/2.3
remotes/origin/2.4.0/master
remotes/origin/dist/ubuntu/lucid/master
remotes/origin/dist/ubuntu/precise/master
remotes/origin/master
</pre>
h3. Branche de packaging
Il faut créer une branche de packaging associée à la branche d’intégration des correctif 2.4.0 :
<pre>
moi@work:~/src/$PAQUET (master)$ git branch dist/eole/2.4.0/master dist/ubuntu/precise/master
moi@work:~/src/$PAQUET (master)$ git push -u origin dist/eole/2.4.0/master
moi@work:~/src/$PAQUET (master)$ git branch -a
2.3
2.4.0/master
dist/eole/2.4.0/master
dist/ubuntu/lucid/master
dist/ubuntu/precise/master
* master
remotes/origin/2.3
remotes/origin/2.4.0/master
remotes/origin/dist/eole/2.4.0/master
remotes/origin/dist/ubuntu/lucid/master
remotes/origin/dist/ubuntu/precise/master
remotes/origin/master
</pre>
h2. Préparer EOLE 2.4.1
*ATTENTION* : Sans nouveau code il n’y a pas besoin d’une nouvelle numérotation de version, il faut donc au moins un premier commit différent entre la branche *@master@* et la branche *@2.4.0/master@*.
h3. Vérifier si les deux branches pointent vers le même commit
*ATTENTION* : les branches *@master@* et *@2.4.0/master@* doivent être à jour par rapport au dépôt central.
<pre>
moi@work:~/src/$PAQUET (master)$ test "$(git rev-parse master)" = "$(git rev-parse 2.4.0/master)" && echo "ATTENTION: branches identiques" || echo "OK: branches différentes"
ATTENTION: branches identiques
</pre>
h3. Faire un premier commit pour la 2.4.1
L’idée est de faire un commit sur la branche *@master@* qui ne sera pas sur la branche *@2.4.0/master@*.
Création ou modification du fichier *@.gitignore@* :
<pre>
moi@work:~/src/$PAQUET (master)$ test -f .gitignore && sed -i -e '1 i # EOLE 2.4.1 gitignore' .gitignore || cat >> .gitignore <<EOF
# EOLE 2.4.1 gitignore
# Backup and swap files
*~
*#
*.swp
EOF
moi@work:~/src/$PAQUET (master *)$ git add .gitignore
moi@work:~/src/$PAQUET (master +)$ git commit -m "Update gitignore for EOLE 2.4.1"
moi@work:~/src/$PAQUET (master >)$ git push
</pre>
h3. Créer un tag afin de déterminer la version du paquet
<pre>
moi@work:~/src/$PAQUET (master)$ git tag -s -m "Prepare EOLE 2.4.1" release/2.4.1 master
moi@work:~/src/$PAQUET (master)$ git push origin release/2.4.1
</pre>
h1. Préparer un dépôt pour EOLE 2.4.1
Rappel il ne faut jamais fusionner une branche d’une version supérieure à une version inférieure, par exemple : inférieure :
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge master
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.1
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge 2.4.2/master
</pre>
* *NE PAS FAIRE*
<pre>
moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.2
</pre>
h2. Isoler EOLE 2.4.0
h3. Code source
Il faut créer une branche d’intégration des correctifs dédiées à EOLE 2.4.0 :
<pre>
moi@work:~/src/$PAQUET (master)$ git branch 2.4.0/master master
moi@work:~/src/$PAQUET (master)$ git push -u origin 2.4.0/master
moi@work:~/src/$PAQUET (master)$ git branch -a
2.3
2.4.0/master
dist/ubuntu/lucid/master
dist/ubuntu/precise/master
* master
remotes/origin/2.3
remotes/origin/2.4.0/master
remotes/origin/dist/ubuntu/lucid/master
remotes/origin/dist/ubuntu/precise/master
remotes/origin/master
</pre>
h3. Branche de packaging
Il faut créer une branche de packaging associée à la branche d’intégration des correctif 2.4.0 :
<pre>
moi@work:~/src/$PAQUET (master)$ git branch dist/eole/2.4.0/master dist/ubuntu/precise/master
moi@work:~/src/$PAQUET (master)$ git push -u origin dist/eole/2.4.0/master
moi@work:~/src/$PAQUET (master)$ git branch -a
2.3
2.4.0/master
dist/eole/2.4.0/master
dist/ubuntu/lucid/master
dist/ubuntu/precise/master
* master
remotes/origin/2.3
remotes/origin/2.4.0/master
remotes/origin/dist/eole/2.4.0/master
remotes/origin/dist/ubuntu/lucid/master
remotes/origin/dist/ubuntu/precise/master
remotes/origin/master
</pre>
h2. Préparer EOLE 2.4.1
*ATTENTION* : Sans nouveau code il n’y a pas besoin d’une nouvelle numérotation de version, il faut donc au moins un premier commit différent entre la branche *@master@* et la branche *@2.4.0/master@*.
h3. Vérifier si les deux branches pointent vers le même commit
*ATTENTION* : les branches *@master@* et *@2.4.0/master@* doivent être à jour par rapport au dépôt central.
<pre>
moi@work:~/src/$PAQUET (master)$ test "$(git rev-parse master)" = "$(git rev-parse 2.4.0/master)" && echo "ATTENTION: branches identiques" || echo "OK: branches différentes"
ATTENTION: branches identiques
</pre>
h3. Faire un premier commit pour la 2.4.1
L’idée est de faire un commit sur la branche *@master@* qui ne sera pas sur la branche *@2.4.0/master@*.
Création ou modification du fichier *@.gitignore@* :
<pre>
moi@work:~/src/$PAQUET (master)$ test -f .gitignore && sed -i -e '1 i # EOLE 2.4.1 gitignore' .gitignore || cat >> .gitignore <<EOF
# EOLE 2.4.1 gitignore
# Backup and swap files
*~
*#
*.swp
EOF
moi@work:~/src/$PAQUET (master *)$ git add .gitignore
moi@work:~/src/$PAQUET (master +)$ git commit -m "Update gitignore for EOLE 2.4.1"
moi@work:~/src/$PAQUET (master >)$ git push
</pre>
h3. Créer un tag afin de déterminer la version du paquet
<pre>
moi@work:~/src/$PAQUET (master)$ git tag -s -m "Prepare EOLE 2.4.1" release/2.4.1 master
moi@work:~/src/$PAQUET (master)$ git push origin release/2.4.1
</pre>