Build script rework#1328
Merged
Merged
Conversation
dff2edf to
ec48cb1
Compare
f20ffa5 to
743719b
Compare
5e128d5 to
90f641b
Compare
- Change from author date to commit date for version numbers - Optimize build speed by caching dependencies and timestamps - Output a lot more info about what Build.ps1 is doing - Only release scripts that have docs - Add docs for scripts missing docs - Validate that PRs do not have commits that are older than main
90f641b to
fbbe20c
Compare
dpaulson45
approved these changes
Nov 10, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue 1:
It's easy to accidentally release a new script. This can happen if a script that was previously included in another script is no longer included, or if a new script is added for testing or some other reason.
Fix 1:
This new build logic only publishes a script if one of the following is true:
Issue 2:
Build.ps1 performs repetitive disk-intensive work, which takes longer than necessary.
Fix 2:
The new logic scans the repo, building a hashtable of dependencies and commit times. These hashtables are then used within Build.ps1 itself, so that we don't have to go back to disk for the same information repeatedly.
Issue 3:
Build.ps1 is very quiet and doesn't give much information about what it's up to.
Fix 3:
The new logic produces a ton of output, including full dependency trees for each script, and the commit time on each of those files. It also calls out unreferenced scripts in the global Shared folder as well as scripts that are both undocumented and unreferenced in other folders.
Issue 4:
It is possible to merge a PR to main which has older timestamps than what is already in main. This causes a new script to release without a version number change, even though the script changed.
Fix 4:
Switch from author time to commit time for version numbers. Then, use the new ValidateMerge.ps1 in the pipeline for PRs to main. If it discovers commit times in the PR that are older than what is already in main, it will instruct the user to rebase, which will update the commit times in the PR. Fixes #1330.