Skip to content

A test for mismatching checked out git tag when publishing#1329

Merged
f-f merged 2 commits intopurescript:masterfrom
fsoikin:test-mismatching-tags
Feb 14, 2025
Merged

A test for mismatching checked out git tag when publishing#1329
f-f merged 2 commits intopurescript:masterfrom
fsoikin:test-mismatching-tags

Conversation

@fsoikin
Copy link
Collaborator

@fsoikin fsoikin commented Feb 10, 2025

Description of the change

Fixes #1109

When Spago tries to publish, and the currently checked out git tag doesn't match the publish.version config value, Spago errors out explaining the situation.

The behavior itself has been in place for a while. This PR just adds a test for it.

While I was at it, I also took the opportunity to extract the transfer tests into their own file Transfer.purs. They have been placed among the publish tests, I'm assuming by mistake.

Checklist:

  • [ ] Added the change to the "Unreleased" section of the changelog
  • [ ] Added some example of the new feature to the README
  • Added a test for the contribution (if applicable)

spago [ "fetch" ] >>= shouldBeSuccess
spago [ "publish", "-p", "root", "--offline" ] >>= shouldBeFailureErr (fixture "publish/1307-publish-dependencies/expected-stderr.txt")

Spec.describe "transfer" do
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub doesn't show this diff in its most sensical way. The transfer section has been moved out to Transfer.purs and two tests right after it were indented one level to bring them back under publish.

This diff is best viewed with whitespace ignored.

Copy link
Member

@f-f f-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely 👏

@f-f f-f merged commit 3c25ef1 into purescript:master Feb 14, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

Can not publish with tag v0.0.2 only v0.0.1 for initial publish

2 participants