Detect git tag already defined earlier
Open
Nobody has claimed this yet.
- Dominant language
- PureScript
- Stars
- 831
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
» spago publish
Reading Spago workspace configuration...
✅ Selecting package to build: foldable-traversable-extra
Downloading dependencies...
Building...
Src Lib All
Warnings 0 0 0
Errors 0 0 0
✅ Build succeeded.
Your package "foldable-traversable-extra" is not ready for publishing yet, encountered 1 error:
❌ The git tree is not clean. Please commit or stash these files:
M spago.yaml
» git commit
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: spago.yaml
no changes added to commit (use "git add" and/or "git commit -a")
» git add .
» git commit
[main 2397e44] Fix repo name
1 file changed, 1 insertion(+), 1 deletion(-)
» spago publish
Reading Spago workspace configuration...
✅ Selecting package to build: foldable-traversable-extra
Downloading dependencies...
Building...
Src Lib All
Warnings 0 0 0
Errors 0 0 0
✅ Build succeeded.
Your package "foldable-traversable-extra" is not ready for publishing yet, encountered 2 errors:
❌ No git tag is currently checked out.
Please fix all other publishing-related errors before resolving this one. Prematurely creating and pushing a tag may lead to unpublishable tags.
❌ The expected tag (v0.0.4) has already been defined but is not checked out.
The publish config's `version` may need to be bumped to a newer version if it currently refers to a version that has already been published.
The very last warning The expected tag (v0.0.4) has already been defined could already be displayed earlier before the first commit because spago.yaml is already present
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported sequence with spago publish, an existing v0.0.4 tag, and an uncommitted spago.yaml change. Start at the publish validation invoked by that command and compare when the existing-tag check and clean-tree check are reported. Done means the already-defined tag warning appears before the first commit when the existing version is already tagged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- cli, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100