Created
August 22, 2024 15:51
-
-
Save doug65536/6f31a8dbf70ded7199738c2f309eeb5e to your computer and use it in GitHub Desktop.
This file contains 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
# Define the path to the certificate file | |
$certFilePath = "path\to\your\certificate.pem" | |
# Get the latest commit hash | |
$latestCommit = git rev-parse HEAD | |
# Check if the certificate file was changed in the latest commit | |
$changes = git diff --name-only HEAD~1..HEAD | |
if ($changes -contains $certFilePath) { | |
Write-Output "Certificate has changed, cherry-picking..." | |
git cherry-pick $latestCommit | |
} else { | |
Write-Output "No certificate changes." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment