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

request: add hook for version command, which runs after versioning but before committing #321

Closed
1 task done
blaugold opened this issue Jun 13, 2022 · 1 comment · Fixed by #458
Closed
1 task done
Assignees

Comments

@blaugold
Copy link
Collaborator

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

The hook should run as part of melos version after versions have been updated but before committing changes, as compared to postversion, which runs after committing changes.

Reasoning

This allows a hook to generate/update files that should be committed, based on the new versions.

Additional context and comments

No response

@blaugold blaugold added Needs: Triage The issue needs triaging feature request labels Jun 13, 2022
@blaugold
Copy link
Collaborator Author

Just realized that melos version already supports this, but its hooks are a bit confusing:

  • preversion: correspondents to the hook that runs before a command and has the same name as the command for bootstrap and clean
  • version: runs after versioning but before committing
  • postversion: correspondents to the hook that runs after a command and follows the same naming convention as bootstrap and clean

We should document this and consider bringing version in line with the other commands, though that would require a breaking change.

@blaugold blaugold removed the Needs: Triage The issue needs triaging label Jun 15, 2022
@blaugold blaugold self-assigned this Feb 1, 2023
blaugold added a commit that referenced this issue Feb 1, 2023
- Make naming more consistent.
- Make `version` command hooks consistent with the hooks of other commands.

Fixes #321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant