Also I just realized that despite --dry-run it seems to have written a .solrrc file in my home dir (it did not write it in ~/.solr-releases that it suggested as a root?)
it seems unexpected for --dry-run to leave persistent changes? On Sun, Apr 21, 2024 at 3:37 PM Gus Heck <gus.h...@gmail.com> wrote: > I had initiated dry runs a few times earlier this week and it stopped on > various dependencies, and I've not got those checks happy, but now I'm > getting: > > "You can only release bugfix releases from an existing release branch" > > The logic I see in the code doesn't make any sense... > > def validate_release_version(self, branch_type, branch, > release_version): > ver = Version.parse(release_version) > # print("release_version=%s, ver=%s" % (release_version, ver)) > if branch_type == BranchType.release: > if not branch.startswith('branch_'): > sys.exit("Incompatible branch and branch_type") > > * if not ver.is_bugfix_release(): sys.exit("You can only > release bugfix releases from an existing release branch")* > elif branch_type == BranchType.stable: > if not branch.startswith('branch_') and branch.endswith('x'): > sys.exit("Incompatible branch and branch_type") > if not ver.is_minor_release(): > sys.exit("You can only release minor releases from an > existing stable branch") > elif branch_type == BranchType.unstable: > if not branch == 'main': > sys.exit("Incompatible branch and branch_type") > if not ver.is_major_release(): > sys.exit("You can only release a new major version from > main branch") > if not getScriptVersion() == release_version: > print("WARNING: Expected release version %s when on branch %s, > but got %s" % ( > getScriptVersion(), branch, release_version)) > > It seems to be looking for something other than a X.Y.0 in order to do a > release that is not a bugfix release (is_bugfix_release checks that the > final digit is other than 0 )? but x.y.0 is correct for a non bugfix > release? > > In any case this seems to be 100% blocking and I'll need to comment it > out... but I worry that there's some undocumented assumption that this > script has to be run before the branch is made and it's unclear what it's > going to try to do if the branch exists. Is it expecting to run its own VCS > commands? (I think it really should be suggesting commands that touch the > repo for human review, not running them if that's the case) > > My first initial comment on this process is scripts are nice, but if they > are black boxes and there's no documentation of the intended process or > where the script comes into the process and what parts of the process the > script is handling, it's pretty hard to know how to use the script (or how > to know if it goes awry) > > -Gus > > -- > http://www.needhamsoftware.com (work) > https://a.co/d/b2sZLD9 (my fantasy fiction book) > -- http://www.needhamsoftware.com (work) https://a.co/d/b2sZLD9 (my fantasy fiction book)