neos / flow-development-distribution

Distribution providing a basis for developing Flow
https://www.neos.io/
1 stars 11 forks source link

Scripts should do a simple upmerge for create-branch and create-changelog with skipping changes #70

Open albe opened 3 years ago

albe commented 3 years ago

Currently, the create-branch script will adjust composer.json dependencies to the specific release version. A following upmerge can easily forget to reset those versions back to the dev-master defaults and hence the master ends up with wrong dependency versions making it impossible to install. (see https://github.com/neos/flow-base-distribution/commit/49cdf3d61c4382dad08dcf16124db76923435ae2 for a manual correction commit of such an issue) The same, but less critical, is the case for create-changelog, which creates a logfile that should not be upmerged and is only relevant for the current major+minor version. It often ends up being upmerged and needs to be deleted manually later. Even when not forgotten, it makes upmerging right after a release a tiny bit more tedious than otherwise.

Both can be prevented if the two scripts above would do a single upmerge similar to this: git checkout origin/master && git merge --no-commit --no-ff $BRANCH && git reset HEAD composer.json && git commit -m "TASK: Upmerge dependency changes from $BRANCH" Note: For the Framework/Neos packages the composer.json of all subpackages would need to be reset.

That would have to happen somewhere here: https://github.com/neos/flow-development-distribution/blob/master/Build/create-branch.sh#L58 and for all of the packages/folders or directly here https://github.com/neos/BuildEssentials/blob/master/ReleaseHelpers.sh#L30

In the case of the changelog, the upmerge would need to happen to the "next higher" branch, which is dynamic.

mficzel commented 3 years ago

Hmm … disable push_branch and push_tag internally and imho it could be safe locally.

mficzel commented 3 years ago

Maybe even an environment variable that can be set for a local only mode. Or that has to be set for the remote mode.