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

Automatically fill in 'publish.location' in config when absent #1288

Merged
merged 12 commits into from
Oct 31, 2024

Conversation

fsoikin
Copy link
Collaborator

@fsoikin fsoikin commented Sep 21, 2024

Description of the change

Fixes #1060

  • When publish.location is missing in the config, Spago will try to figure it out from the origin remote.
  • If figured out successfully, the location is written back to spago.yaml, but the publish operation is still aborted, because now spago.yaml needs to be committed to Git.
  • If there is no remote named origin, Spago gives up.
  • If the origin remote has a GitHub URL, Spago uses the owner+repo format, otherwise - the sole URL format.

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)

src/Spago/Command/Publish.purs Outdated Show resolved Hide resolved
src/Spago/Command/Publish.purs Outdated Show resolved Hide resolved
src/Spago/Command/Publish.purs Outdated Show resolved Hide resolved
src/Spago/Command/Publish.purs Outdated Show resolved Hide resolved
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.

Thanks!

@f-f f-f merged commit e7a4e7e into purescript:master Oct 31, 2024
5 checks passed
@fsoikin fsoikin deleted the fill-location branch October 31, 2024 15:11
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.

Location field autofill
2 participants