-
Notifications
You must be signed in to change notification settings - Fork 162
Use GitVersion for versioning #1063
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
Conversation
|
Closed this PR and will reopen. The issue-1061 branch already has the same commits as master plus 2 more commits. The branch build is passing on AppVeyor but the PR fails. Let's see if reopening it helps! |
| @@ -1,135 +1,45 @@ | |||
| static string Target; Target = Argument("target", "Default"); | |||
| static string Configuration; Configuration = Argument("configuration", "Release"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you try static readonly string Configuration = Argument("configuration", "Release");?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair. Some things can't be readonly, of course, but I got carried away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those things, just a shortening of the syntax then, like:
| static string Configuration; Configuration = Argument("configuration", "Release"); | |
| static string Configuration = Argument("configuration", "Release"); |
| // NOTE: This is complicated because (1) the user may have specified | ||
| // the package version on the command-line and (2) GitVersion may | ||
| // or may not be available. We'll work on solving (2) by getting | ||
| // GitVersion to run for us on Linux, but (1) will alwas remain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // GitVersion to run for us on Linux, but (1) will alwas remain. | |
| // GitVersion to run for us on Linux, but (1) will always remain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I should take most of this out. I got it running on Linux!
| // or may not be available. We'll work on solving (2) by getting | ||
| // GitVersion to run for us on Linux, but (1) will alwas remain. | ||
| // | ||
| // We simplify things a by figuring out the full package version and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // We simplify things a by figuring out the full package version and | |
| // We simplify things by figuring out the full package version and |
|
No help there! Suspecting some code, which only executes for a PR. |
|
Thanks @jnm2. Now if I can just get the PR to build! |
|
Diagnostic gives me...
Trying that next. |
|
I wonder if it has anything to do with the fact that the PR build (not the branch build) is building a dynamically created merge commit back to the main branch. |
|
Yes, I took a quick look at the code and that seems to be what it is. When I get a moment (I'm taking down our tree now) I'll try the suggested workaround in AppVeyor.yml. If that fails, I'm pretty sure I can merge locally and just push to master, but I'd prefer something that will keep working for future PRs. |
|
Well, that makes it build by suppressing the error but it results in an improper PackageVersion for the PR. Not that important, since we don't do anything with artifacts from a PR build anyway. I'll do one more iteration cleaning out all my debug stuff. BTW, this is issue GitTools/GitVersion#2554 |
de4b878 to
2784d8d
Compare
|
A comment on the issue indicates that GitVersion 5.6.3 doesn't have the problem, so I'm trying that. |
ff930c1 to
c8ba618
Compare
c8ba618 to
5e21e6d
Compare
|
This seems to be as good as it gets for the moment. With GitVersion 5.0.0 (the version I have used in my other projects) I get failures in Azure. With 5.8.1 (latest) the aforementioned bug shows up. Everything passes in 5.6.3 but we no longer get a special naming pattern with a "pr" label and the PR number. However, since we don't publish them it doesn't matter that much. When I get a chance I'll follow up on this with a little test project. |
Fixes #1061
Once this merges, I'll need to delete any existing 3.14.0-devxxxxx entries with a larger suffix from MyGet.