[JGit] comment utiliser TagCommand
bonjour,
je suis toujours sur mon projet de gestion de mise à jour à distance.
mais maintenant je continue avec "TagCommand".
je souhaite mettre un tag sur le commit le plus récent mais pour le moment je n'arrive à rien.
le code ressemble à çà pour le moment :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
public class TagService {
public static void tag(String recup) throws IOException, GitAPIException {
System.out.println("Ajout d'un tag sur la dernière version");
String depotLocalString = recup;
Repository depotLocal;
depotLocal = new FileRepository(depotLocalString);
Git git = new Git(depotLocal);
RevObject id = null;
PersonIdent tagger = new PersonIdent(depotLocal);
git.tag().setObjectId(id).setTagger(tagger);
git.tag().setMessage("testTag-1");
System.out.println(git.tag().getMessage());
}
} |
si quelqu’un peut m'aider merci d'avance. :merci: