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

Update Merge Blitz.ps1 so not hardcoded to directory path #3595

Closed

Conversation

DanielLoth
Copy link

Overview

This change updates the script such that it'll run on other peoples' machines, even when they don't have a folder path that is specific to Brent's developer machine.

Testing notes

Running Merge Blitz.ps1 from the repository root directory

Command:

& '.\Documentation\Development\Merge Blitz.ps1'

Demo:

PS C:\Dev\SQL-Server-First-Responder-Kit> git status
On branch update-merge-ps1-script
Your branch is up to date with 'origin/update-merge-ps1-script'.

nothing to commit, working tree clean
PS C:\Dev\SQL-Server-First-Responder-Kit> & '.\Documentation\Development\Merge Blitz.ps1'
PS C:\Dev\SQL-Server-First-Responder-Kit> git status
On branch update-merge-ps1-script
Your branch is up to date with 'origin/update-merge-ps1-script'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   Install-All-Scripts.sql
        modified:   Install-Azure.sql

no changes added to commit (use "git add" and/or "git commit -a")

Running Merge Blitz.ps1 from the same directory

Command:

& '.\Merge Blitz.ps1'

Demo:

PS C:\Dev\SQL-Server-First-Responder-Kit\Documentation\Development> git status
On branch update-merge-ps1-script
Your branch is up to date with 'origin/update-merge-ps1-script'.

nothing to commit, working tree clean
PS C:\Dev\SQL-Server-First-Responder-Kit\Documentation\Development> & '.\Merge Blitz.ps1'
PS C:\Dev\SQL-Server-First-Responder-Kit\Documentation\Development> git status
On branch update-merge-ps1-script
Your branch is up to date with 'origin/update-merge-ps1-script'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   ../../Install-All-Scripts.sql
        modified:   ../../Install-Azure.sql

no changes added to commit (use "git add" and/or "git commit -a")

This change updates the script such that it'll run on other
peoples' machines, even when they don't have a folder path
that is specific to Brent's developer machine.
@BrentOzar
Copy link
Member

Hi, can you tell me a little about the use case for this?

@DanielLoth
Copy link
Author

Hi. Same use case as before - combines the various scripts. But now the correct operation of the script isn't dependent on the repository being checked out to the very specific /Users/brentozar/LocalOnly/Github/SQL-Server-First-Responder-Kit directory path.

@BrentOzar
Copy link
Member

BrentOzar commented Dec 7, 2024 via email

@DanielLoth
Copy link
Author

Oh, I don't. I was just looking through the repo while doing your course on using it, tried to run the script, and found it didn't work.

@BrentOzar
Copy link
Member

OK, gotcha. Let's hold off on changing code without a use case for now, and if you'd like to contribute further, make sure to check out the contribution instructions in the repo. Thanks though!

@BrentOzar BrentOzar closed this Dec 14, 2024
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.

2 participants