Generating release notes with git log #2041
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceCodemagic workflow triggers upon creating tag. So to generate release notes from git commits I have a script that does the following.
This is the script:
This script works perfectly on local machine, but for some reason it doesn't work on Codemagic's side.
This is what prints script when run on Codemagic:
As you can see, Codemagic able to print only first commit, ignoring all others. This is happens only if workflow was triggered by tag. Even simple git log returns only one commit, and it's current commit, on which workflow is running (triggered by tag). Expected resultsGenerate same result as on local machine
Actual resultsCodemagic able to print only first commit, ignoring all others
Build id (optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
hey @personaljesusua, although we are chatting through Intercom, i'll post here as well.. The issue is related to the CM_CLONE_DEPTH environment variable, which is configured to clone only one commit by default for builds triggered by tags. To generate release notes between tags, you may need to adjust the CM_CLONE_DEPTH environment variable to a higher value that suits your requirements. For example, if you want to capture all commits between tags v1.0.0 and v2.0.0, you can set CM_CLONE_DEPTH to a number greater than the number of commits between those tags (e.g., 10 or more). This change will allow your script to fetch and generate release notes from the desired commit range. Keep in mind that modifying CM_CLONE_DEPTH might increase the time it takes to clone the repository during the build, so consider the trade-off between clone depth and build performance. |
Beta Was this translation helpful? Give feedback.
hey @personaljesusua, although we are chatting through Intercom, i'll post here as well..
The issue is related to the CM_CLONE_DEPTH environment variable, which is configured to clone only one commit by default for builds triggered by tags.
To generate release notes between tags, you may need to adjust the CM_CLONE_DEPTH environment variable to a higher value that suits your requirements. For example, if you want to capture all commits between tags v1.0.0 and v2.0.0, you can set CM_CLONE_DEPTH to a number greater than the number of commits between those tags (e.g., 10 or more). This change will allow your script to fetch and generate release notes from the desired commit range.
Keep in mi…