A release couldn't be made
error: the tag [email protected] is already therehint: A version is only released once. Delete the tag if it was made by mistake, or release the commits after it.Why it happens
Section titled “Why it happens”axle release couldn’t work out or make the release:
- A tag is already there. The new version was released before, perhaps from another branch.
- A version it can’t read. A
package.jsonhas a version that isn’t one Semantic Versioning allows, such as1.2or01.2.0. - A version it can’t bump. Its numbers are already the highest Axle can count to,
18446744073709551615. - A pre-release it can’t continue. A package on a pre-release such as
1.0.0-1, whose first part isn’t a name, has changes, andaxle releasecan’t tell which pre-release comes next. - A version that would go down. A pre-release name sorts before the current one, so
--pre alphaon1.3.0-beta.1would make1.3.0-alpha.0, an older version. - A file in
alsoUpdatedoesn’t have the version. None of its lines that mentionversionhas the packages’ current version. - A version can’t be a tag. The package’s name has a character Git doesn’t allow in a tag, such as
~,^or:, which npm allows. Axle checks every tag before it writes anything. - The lockfile couldn’t be updated. The package manager failed while writing the new versions into the lockfile. Axle puts the repository back as it was, so nothing is released.
- There’s no history to read. The folder isn’t in a Git repository, or the repository has no commit yet.
- Git failed. Reading the history, committing or tagging went wrong, and the message gives Git’s own reason. When committing or tagging fails, Axle puts the repository back as it was, deleting the tags it had made, so nothing is released.
How to fix it
Section titled “How to fix it”- For a tag that’s there, check
git tag --listandgit log: if the tag is right, the version was released, so the next release starts after it. Delete a tag made by mistake withgit tag -d <tag>. - Give the package a version such as
1.2.0or1.2.0-beta.1. - For a pre-release Axle can’t continue, run
axle release --pre betato start a new one, oraxle release --graduatefor a stable version. - For a version that would go down, pick a pre-release name that sorts after the current one, such as
rcafterbeta, or graduate. - Set the file in
alsoUpdateto the packages’ version once, or take it out of the list. - Rename a package whose name can’t be a tag.
- When the lockfile couldn’t be updated, fix what the package manager printed, then run
axle releaseagain. - Run
git initand commit, then release. - When Git failed, fix what it said, such as a commit hook that refuses the message or tag signing without a key, then run
axle releaseagain.