Skip to content

Commit

Permalink
fix: PR creation is automated in the homebrew-taps repo so no need to…
Browse files Browse the repository at this point in the history
… create it here (#97)
  • Loading branch information
hnrkndrssn authored Sep 30, 2022
1 parent 8cd12dc commit ee03780
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,9 @@ step "create-pull-request-to-update-formula-in-homebrew" {

Copy-Item -Path "$extractedPath/*" -Filter "*.rb" -Destination "." -Force

git commit -a -m "octopus-cli $packageVersion"
git push --set-upstream origin $branchName

if ($githubtoken) {
$baseBranch = $(git symbolic-ref "refs/remotes/origin/HEAD") -replace "refs/remotes/origin/", ""

$body = @{
title = "octopus-cli $packageVersion"
body = "automatically generated"
head = $branchName
base = $baseBranch
} | ConvertTo-Json

$body

Invoke-RestMethod -Method POST `
-Headers @{"Accept" = "application/vnd.github+json";"Authorization" = "Bearer $githubtoken"} `
-Uri https://api.github.com/repos/OctopusDeploy/homebrew-taps/pulls `
-ContentType "application/json" `
-Body "$body"
}
git diff-index --quiet HEAD || (git commit -m "Update for release $packageVersion" \
&& git push --repo $origin --set-upstream origin $branchName \
)

cd ..
EOT
Expand Down

0 comments on commit ee03780

Please sign in to comment.