Skip to content

Conversation

@exAspArk
Copy link
Contributor

No description provided.


if [[ $(__write_version) == false ]]; then
return 0
fi
Copy link
Owner

Choose a reason for hiding this comment

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

By returning here, not allowing the execution to continue, bumping of the version will be completely disabled. I don't think that's what we want. I think we only want to prevent the version being read from and written to a file.

As an alternative, you could truncate the value of $VERSION_FILE if $(__write_version) is false (making it empty). Then the semverbump.sh could skip reading from the version file if it's empty. It would still lookup the version based on git tags (in fact, it does that first, and only uses the file if no suitable tags were found).

The change you made to write-version.sh already makes sure the version file won't be written to.

Copy link
Contributor Author

@exAspArk exAspArk Nov 1, 2016

Choose a reason for hiding this comment

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

@jaspernbrouwer hi, thanks for the feedback.

In our company we don't use $VERSION_FILE and always specify the version manually (via our bot). That's why I decided to disable bumping of the version :)

What do you think about another idea – removing the $VERSION_FILE completely before executing the semverbump.sh? By using this approach, we don't need to persist $VERSION_FILE, change the code in the semverbump.sh as it tries to use tags and fallbacks to 0.0.0 by default.

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.

2 participants