ToAdvanceSecurity.ps1 488 B

123456789101112131415
  1. $branch = git rev-parse --abbrev-ref HEAD
  2. $ssha = git rev-parse --short head
  3. $filePath = Join-Path -Path (Get-Location) -ChildPath "source_commit"
  4. [System.IO.File]::WriteAllLines($filePath, "Sync updates from "+$branch+" in general repo(Commit SHA:"+$ssha+")to security repo")
  5. mv .git OriginGit
  6. mv AdvSecurityGit .git
  7. git add -A
  8. git commit -a -F source_commit
  9. git push
  10. mv .git AdvSecurityGit
  11. mv OriginGit .git
  12. git add -A
  13. git commit -a -F source_commit
  14. git push
  15. Remove-Item "source_commit"