Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHANGELOG.md not getting created/generated #127

Open
emme1444 opened this issue Jan 21, 2021 · 3 comments
Open

CHANGELOG.md not getting created/generated #127

emme1444 opened this issue Jan 21, 2021 · 3 comments

Comments

@emme1444
Copy link

I know there has been a number of these issues on here, but none of those answer my question / fix my problem.

It used to work, but in the process of testing out configurations now all of a sudden, it's not working. It doesn't create the CHANGELOG.md file. However, all the other plugins seem to work fine.

Here you can see the log output of semantic-release along with its associated configuration.

.releaserc.yaml:

branches:
  - master
repositoryUrl: https://github.com/emme1444/analyst-test4.git
plugins:
  - "@semantic-release/commit-analyzer":
    preset: conventionalcommits
  - "@semantic-release/release-notes-generator":
    preset: conventionalcommits
  - "@semantic-release/changelog"
  - "semantic-release-dart"
  - "@semantic-release/git":
    assets:
      - "CHANGELOG.md"
      - "pubspec.yaml"
      - "pubspec.lock"
dryRun: false
debug: true

debug output of semantic-release:

[9:48:37 AM] [semantic-release] › ℹ  Running semantic-release version 17.3.6
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "semantic-release-dart"
[9:48:39 AM] [semantic-release] › ✔  Run automated release from branch master on repository https://github.com/emme1444/analyst-test4.git
[9:48:39 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[9:48:39 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ℹ  No git tag version found on branch master
[9:48:39 AM] [semantic-release] › ℹ  No previous release found, retrieving all commits
[9:48:39 AM] [semantic-release] › ℹ  Found 1 commits since last release
[9:48:39 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix: initial commit
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: patch release
[9:48:39 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:48:39 AM] [semantic-release] › ℹ  There is no previous release, the next release version is 1.0.0
[9:48:39 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "semantic-release-dart"
[9:48:39 AM] [semantic-release] [semantic-release-dart] › ℹ  Write version 1.0.0 to pubspec.yaml in /home/runner/work/analyst-test4/analyst-test4
[9:48:39 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "semantic-release-dart"
[9:48:45 AM] [semantic-release] › ✔  Created tag v1.0.0
[9:48:45 AM] [semantic-release] › ✔  Published release 1.0.0 on default channel

As you can see it publishes the release (1.0.0). But in between 'ℹ Start step "prepare" of plugin "@semantic-release/changelog"' and '✔ Completed step "prepare" of plugin "@semantic-release/changelog"'; no logs are written to indicate whether a file was created/generated. In fact, in the cicd pipeline I added an ls -lah command to list the files in the current directory/workspace directory, and this is what that prints (no CHANGELOG.md):

ls -lah output:

total 56K
drwxr-xr-x 6 runner docker 4.0K Jan 21 09:47 .
drwxr-xr-x 3 runner docker 4.0K Jan 21 09:47 ..
drwxr-xr-x 8 runner docker 4.0K Jan 21 09:48 .git
drwxr-xr-x 3 runner docker 4.0K Jan 21 09:47 .github
-rw-r--r-- 1 runner docker  281 Jan 21 09:47 .gitignore
-rw-r--r-- 1 runner docker  545 Jan 21 09:47 .releaserc.yaml
-rw-r--r-- 1 runner docker  12K Jan 21 09:47 LICENSE
-rw-r--r-- 1 runner docker  478 Jan 21 09:47 README.md
-rw-r--r-- 1 runner docker   35 Jan 21 09:47 analysis_options.yaml
drwxr-xr-x 2 runner docker 4.0K Jan 21 09:47 example
drwxr-xr-x 2 runner docker 4.0K Jan 21 09:47 lib
-rw-r--r-- 1 runner docker  253 Jan 21 09:48 pubspec.yaml

I've tried stripping the configuration down, but can't seem to figure out where I went wrong.

Thanks for the help!

@emme1444
Copy link
Author

emme1444 commented Jan 22, 2021

So, it looks like I narrowed the problem down. But I still kind of wanna know why. Or maybe it still is a bug, I don't know.

Basically, I removed the preset options for @semantic-release/commit-analyzer and @semantic-release/release-notes-generator, so that they use the Angular commit spec. My configuration now looks like this:

branches:
  - master
repositoryUrl: https://github.com/emme1444/analyst-test4.git
plugins:
  - "@semantic-release/commit-analyzer"
  - "@semantic-release/release-notes-generator"
  - "@semantic-release/changelog"
  - "semantic-release-dart"
  - "@semantic-release/git":
    assets:
      - "CHANGELOG.md"
      - "pubspec.yaml"
      - "pubspec.lock"
dryRun: false
debug: true

Anyway, I still kind of wanna know why this happens. Have I missed something? I initially intended to use the Conventional Commits spec, so would be useful to know.

@nitpum
Copy link

nitpum commented Jun 11, 2021

@semantic-release/changelog use notes from other plugin (@semantic-release/notes-generator) to create change log
https://github.com/semantic-release/changelog/blob/master/lib/prepare.js#L9

@kcmr
Copy link

kcmr commented Sep 29, 2023

I'm experiencing the same problem with conventional-changelog-conventionalcommits@7. It seems to be a bug or incompatible change introduced in version 7. It works as expected (CHANGELOG is generated) with versions lower than 7. I've tried 6 and 5 and both work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants