https://pantsbuild.org/ logo
#general
Title
# general
n

nice-france-74763

07/17/2021, 10:35 AM
Does anyone have a good solution with
./pants package ::
to block CI when a release version for a changed package already exists? (eg, if I change a package and do not update the version number I would like to see a failure).
c

curved-television-6568

07/17/2021, 12:41 PM
Sorry, I don’t have. However this ties into my ponderings for a ”publish” goal. Taken a packaged distribution, wouldn’t it be nice to be able to upload it to a pypi/docker/.. registry. And a goal like that could have knowledge about existing packages and versions, and possibly fail a build early in cases such as you describe.
n

nice-france-74763

07/17/2021, 12:54 PM
I think in both cases you have the same fundamental needs: 1. Check published versions 2. Release packages at atoms (instead of a monolithic "everything gets released" process) 3. Check if your code should release a new version or not I just changed my CD pipeline to allow "everything" to get published without a version increment. https://github.com/Incognito/python-architecture-linter/commit/12a5f3ce4300f705d7d84563d25541003e218eb1 The reasoning is that if I'm only releasing 1 of 4 packages, I don't want CI to fail and I don't want to superficially increment all unrelated package versions everywhere.
At the moment I don't have an out-of-the-box solution to check published versions, check for diffs in my local project, and list what versions I would create. I think it can be solved but it needs lots of custom code (as far as I can tell).
5 Views