Skip to content
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

docs: use unlikely example versions in nuget package script #7448

Merged
merged 2 commits into from
Sep 4, 2020
Merged

docs: use unlikely example versions in nuget package script #7448

merged 2 commits into from
Sep 4, 2020

Conversation

marcelwgn
Copy link
Contributor

Summary of the Pull Request

The versions used here are not good examples for two reasons:

  • The old version is higher than the new version
  • They refered to actual versions meaning they would be picked up by the script

References

N/A

PR Checklist

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed


Example usage:

`git grep -z -l Microsoft.UI.Xaml | xargs -0 sed -i -e 's/2.5.0-prerelease.200609001/2.4.200117003-prerelease/g'`
`git grep -z -l Microsoft.UI.Xaml | xargs -0 sed -i -e 's/2.4.0-prerelease.200506002/2.5.0-prerelease.200812002/g'`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those versions don't refer to actual packages because the first two digits are the year, the second two digits are month, and the next two digits are the day. By changing the last digit, we are actually referencing the second package of that day which will not exist, thus wouldn't be a valid upgrade/downgrade path. This avoids people accidently changing the values while updating the WinUI version.

@DHowett
Copy link
Member

DHowett commented Aug 28, 2020

Funny thought: should the old version in the sed script be the one we currently have? That way, the script will always update "what we currently have" to [new value]?

(Feel free to merge w/o me)

@DHowett
Copy link
Member

DHowett commented Aug 28, 2020

(Like: old would always be current, and new would never match anything so it would always look like a current->XXX transition)

@marcelwgn
Copy link
Contributor Author

I like that idea, though I see one big problem: How do we ensure that the new version is higher then the old version? Any version we chose will get outtadet at some point. And when that happens we are essentially back to the current state where the old version is higher then the new version, which is confusing when reading the example.

@DHowett
Copy link
Member

DHowett commented Aug 30, 2020

Perhaps the literal string new.package.version, which will have the added bonus of blowing up at compile time for anybody who doesn’t pay attention.

@marcelwgn
Copy link
Contributor Author

Hmm. But replacing $NewVersionNumber with "new.package.version" or something similar for an example isn't too helpful I think. But if the team desires that, I will change that.

@DHowett DHowett changed the title Update example versions used in documentation for updating nuget packages to be more logical docs: use unlikely example versions in nuget package script Sep 4, 2020
@DHowett DHowett merged commit 5ba992a into microsoft:master Sep 4, 2020
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.

None yet

4 participants