adjust workspace_status to respect tags #9726
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is somewhat hairy. I tested against master (
2.10.0-pre.g1828ed42e4
) andv2.9.0-rc.1
. In the case where HEAD isn't an exact tag, we fall back to the 2.10.0 + pre.gXXXXXX. In the case where HEAD is an exact tag, we strip off the v and split at the first -; v2.9.0-rc.1 becomes APP_VERSION 2.9.0 ADDITIONAL_VERSION -rc.1.Some attention is paid to the status of the working copy. As you edit the code, you create new versions, but git has no way to know this. Prior to this commit, we just tacked on "dirty", but that means when you have a dirty version running and want to re-push, the version checking logic in pachdev can't know if the new code is running or not. For that reason, the "dirty" annotation is now the first 10 bytes of the sha256 of the diffs. It sounds crazy, but basically only changes when you edit stuff, so should result in perfect fidelity. It's also not noticeably slow on my machine.
I think this is the algorithm we want.