Hello Folks,
I’ve been trying to configure Cursor to automatically increment the version number after any code update.
Right now, it works if I manually type:
“When done editing, index the Version Number.”
But I don’t want to have to type this every single time.
I’m developing a WordPress plugin, and I want Cursor to automatically increment the patch version number every time I make a code change.
Example:
- Version format: Major.Minor.Patch →
X.X.{last+1}
- If the current version is
1.0.5
, after a code update, it should automatically become1.0.6
.
I tried adding this rule in the Project Settings > Rules, assuming it would handle this automatically, but NOPE! It doesn’t seem to work.
Here’s what I added to the cursor/rules
file:
WordPress Plugin Version Number
- After making any code changes, always index to the next WordPress plugin version number.
- Follow these rules when indexing the version number:
1. Use the following format: X.X.X (Major.Minor.Patch)
2. After making any code changes, always increment the Patch Number.
3. Use this format: (X.X.{last+1})
- Always follow these rules whenever code changes occur.
- Every time a code change is completed, ensure the version number is incremented.
Question:
How can I make this happen automatically without needing to prompt Cursor manually every time?
Any ideas or workarounds would be greatly appreciated!
Thanks,
Mike