-
Notifications
You must be signed in to change notification settings - Fork 0
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
Topic/story 30008 tag publishing and version bumping #22
Topic/story 30008 tag publishing and version bumping #22
Conversation
return true; | ||
} | ||
|
||
private static bool TagLastCommit( BuildContext context, Version? version, string? packageVersionSuffix ) |
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.
Rename to AddTagToLastCommit
|
||
if ( lastVersion > currentVersion ) | ||
{ | ||
context.Console.WriteError( $"Last tag version '{lastVersion}' is bigger than current version '{currentVersion}'" ); |
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.
.
versionNumber = lastVersionTag.Substring( 0, lastVersionTag.IndexOf( '-', StringComparison.InvariantCulture ) ); | ||
} | ||
|
||
var lastVersion = new Version( versionNumber ); |
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.
Version can contain suffixes such as "-preview". By convention, all our version numbers before the dash are are unique, i.e. given a version x.y-z1, we never have x.y-z2.
return false; | ||
} | ||
|
||
File.WriteAllText( |
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.
Use XDocument to load, update, save the file.
return true; | ||
} | ||
|
||
private static bool GetTeamCitySourceWriteToken( out string environmentVariableName, [NotNullWhen( true )] out string? teamCitySourceWriteToken ) |
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.
Move to TeamCityHelper
@@ -17,6 +17,7 @@ public void GenerateTeamcityCode( TextWriter writer ) | |||
vcs {{ | |||
watchChangesInDependencies = {this.WatchChangesInDependencies.ToString().ToLowerInvariant()} | |||
branchFilter = ""+:<default>"" | |||
triggerRules = ""-:comment=<<VERSION_BUMP>>:**"" |
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.
Add comments.
return true; | ||
} | ||
|
||
if ( !IsVersionBumped( context, currentVersion, lastVersionTag ) ) |
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.
Propose --force
d91b86a
to
7295d46
Compare
No description provided.