INNER CODE UNIT · Python

path

labsai/EDDI · scripts/bump-version.py:183

        path = self.root / POM
        text = read(path)
        m = POM_VERSION.search(text)
        # Only the FIRST <version> — the project's own. Every later one is a
        # dependency or plugin, and ci.yml reads the version with the same rule;
        # ReleaseVersionSourceTest keeps a <parent> from ever getting there first.
        self._rewrite(path, text[: m.start(1)] + version + text[m.end(1):])

    def set_pointers(self, version: str) -> None:
        def swap(m: re.Match) -> str:
            whole = m.group(0)
            return whole[: m.start(1) - m.start(0)] + version + whole[m.end(1) - m.start(0):]

        for path in self.pointer_files():
            out = []
            # Line by line, exactly as pointers() and the Java sweep match, so a
            # pattern means the same thing to the check and to the rewrite.
            for line in lines_of(read(path)):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…