Ejemplo n.º 1
0
    def release(self, version: str, message: str, remote: Remote) -> bool:
        tag = Tag(version)
        tag.create(message)
        remote.push(tag)
        extraCommand = self.config.getExtraReleaseCommand()
        if extraCommand is not None:
            cli = simpcli.Command(True)
            cli.execute(extraCommand)

        return True
Ejemplo n.º 2
0
    def release(self, version: str, message: str, remote: Remote) -> bool:
        tag = Tag(version)
        tag.create(message)
        remote.push(tag)
        extraCommand = self.config.getExtraReleaseCommand()
        if extraCommand is not None:
            cli = simpcli.Command(True)
            cli.execute(
                extraCommand
            )

        return True
Ejemplo n.º 3
0
    def getRequestedBranch(self, branch: str) -> [Branch, Tag]:
        tagPrefix = self.config.getTag()
        if branch.startswith(tagPrefix):
            branch = Tag(branch)
        else:
            branch = Branch(branch)

        return branch
Ejemplo n.º 4
0
    def getTags(self) -> List[Tag]:
        output = self.cli.execute('git tag -l')
        if not output:
            return []

        lines = output.split("\n")

        tags = []
        for line in lines:
            tag = line.strip()

            if tag not in tags:
                tags.append(tag)

        tagObjects = []
        tags.sort()
        for tag in tags:
            tagObject = Tag(tag)
            tagObjects.append(tagObject)

        return tagObjects
Ejemplo n.º 5
0
 def getLatestTag(self) -> [Branch, Tag]:
     output = self.cli.execute("git describe --abbrev=0")
     if not output:
         return Branch(self.config.getMaster())
     return Tag(output.strip())
Ejemplo n.º 6
0
    def hasTag(self, tag: Tag) -> bool:
        self.readTags()
        if tag.getName() in self.tags:
            return True

        return False
Ejemplo n.º 7
0
    def hasTag(self, tag: Tag) -> bool:
        self.readTags()
        if tag.getName() in self.tags:
            return True

        return False