cider icon indicating copy to clipboard operation
cider copied to clipboard

Using Cider in a team that has multiple developers

Open Schamppu opened this issue 1 year ago • 3 comments

Hello! I'm using Cider, and we got two devs on the team.

I would love if Cider would allow us to either:

  • Allow generating files for each unreleased change (added, fixed, etc.) which are deleted and merged together when doing "cider release" to the actual CHANGELOG.md.
  • Setting custom path for the files, so that they can be in a subfolder instead of needing to be in the same path if pubspec.

Currently, we both work on different branches, but when we merge the branches having unreleased changes always creates a merge conflict we need to deal with. Having these features would make each change its own file before making a release, and we could set these changes to a subfolder so it doesn't look as messy.

Schamppu avatar Jul 31 '24 13:07 Schamppu

Hey @f3ath anything new on this regard?

Schamppu avatar Sep 05 '24 15:09 Schamppu

I understand the conflict happens in the "Unreleased" section when a feature branch get merged into "main". I also assume that you have some sort of automation in place which runs "cider release" from the main branch after the feature branches are merged.

In this case the most straightforward approach I can imagine is to delegate the compilation of the release section to a simple bash script. You can designate a special folder for the devs to add feature-specific release notes as separate files which then will be iterated and added into the changelog with something as simple as

#!/usr/bin/env bash
categories=( "added" "changed" "deprecated" "removed" "fixed" "security" )
for category in "${categories[@]}" ; do
  for file in $(find "release_notes/$category" -name "*.md" | sort) ; do
    cider log "$category" "$(cat "$file")"
    rm $file
  done
done

The folder will look like this:

-release_notes
 |-added
 | |-feature1.md
 | |-feature2.md
 | `-feature3.md
 |-changed
 | |-feature3.md
 | |-feature1.md
 | `-feature2.md
 ...
 `-fixed
   `-feature1.md

f3ath avatar Sep 06 '24 00:09 f3ath

For more complex scenarios you might want to use change directly to modify the changelog before calling cider release.

f3ath avatar Sep 06 '24 00:09 f3ath