-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I have the need to update some files with the new version before the git commit / tag is created. My problem is I don't know what the new version will be until its calculated by this script, without duplicating the logic.
What I'm picturing is that it would be nice if I could call version get minor which would, instead of printing the current version, it would print the current version with the minor bump applied.
That would allow me to then update the other files I need updated and then once that is all complete, I could call version again to commit it.
e.g.
OLD_VERSION=$(version get)
NEW_VERSION=$(version get minor)
sed -i "" "s/$OLD_VERSION/$NEW_VERSION/" install.sh
sed -i "" "s/$OLD_VERSION/$NEW_VERSION/" README.md
sed -i "" "s/$OLD_VERSION/$NEW_VERSION/" src/version.ts
git add install.sh README.md src/version.ts
git commit 'Updating documentation with new version'
version minor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels