Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
3.5 KiB

  1. # Troubleshooting
  2. ## You do not have permission to publish 'package-name'
  3. When running semantic-release you might encounter the following error:
  4. ```bash
  5. npm ERR! publish Failed PUT 403
  6. npm ERR! code E403
  7. npm ERR! You do not have permission to publish "<package-name>". Are you logged in as the correct user? : <package-name>
  8. ```
  9. This is most likely related to a misconfiguration of the [npm registry authentication](https://github.com/semantic-release/npm#npm-registry-authentication) or to your user [missing permission](https://docs.npmjs.com/cli/team) for publishing.
  10. It might also happen if the package name you are trying to publish already exists (in such case npm consider you are trying to publish a new version of a package that is not yours, hence the permission error).
  11. To verify if your package name is available you can use [npm-name-cli](https://github.com/sindresorhus/npm-name-cli):
  12. ```bash
  13. $ npm install --global npm-name-cli
  14. $ npm-name <package-name>
  15. ```
  16. If the package name is not available, change it in your `package.json` or consider using an [npm scope](https://docs.npmjs.com/misc/scope).
  17. ## Squashed commits are ignored by **semantic-release**
  18. **semantic-release** parses commits according to a [commit message convention](https://github.com/semantic-release/semantic-release#commit-message-format) to figure out how they affect the codebase. Commits that doesn't follow the project's commit message convention are simply ignored.
  19. When [squashing commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) most Git tools will by default generate a new commit message with a summary of the squashed commits. This commit message will most likely not be compliant with the project's commit message convention and therefore will be ignored by **semantic-release**.
  20. When squashing commits make sure to rewrite the resulting commit message to be compliant with the project's commit message convention.
  21. **Note**: if the resulting squashed commit would encompasses multiple changes (for example multiple unrelated features or fixes) then it's probably not a good idea to squash those commits together. A commit should contain exactly one self-contained functional change and a functional change should be contained in exactly one commit. See [atomic commits](https://en.wikipedia.org/wiki/Atomic_commit).
  22. ## `reference already exists` error when pushing tag
  23. **semantic-release** read [Git tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) that are present in the history of your release branch in order to determine the last release published. Then it determines the next version to release based on the commits pushed since then and create the corresponding tag.
  24. If a tag with the name already in your repository, Git will throw and error as tags must be unique across the repository.
  25. This situation happens when you have a version tag identical to the new one **semantic-release** is trying to create that is not in the history of the current branch.
  26. If an actual release with that version number was published you need to merge all the commits up to that release into your release branch.
  27. If there is no published release with that version number, the tag must be deleted.
  28. ```bash
  29. # Verify if the commit exists in the repository
  30. $ git rev-list -1 <tag name>
  31. # If a commit sha is returned, then the tag exists
  32. # Verify the branches having the tagged commit in their history
  33. $ git branch --contains <tag name>
  34. # Delete the tag
  35. $ git tag -d <tag name>
  36. $ git push origin :refs/tags/<tag name>
  37. ```