Skip to content

Commit 5ec402b

Browse files
authored
Check CLI login state before release (heroku#1598)
Otherwise `heroku buildpacks:publish` might error due to auth without hinting that you're not logged in https://github.com/heroku/heroku-buildpack-python/blob/c9942a6829fe2e064db7a26c9d95fbbd1bd9ab72/etc/publish.sh#L24-L28.
1 parent ec90a61 commit 5ec402b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Rakefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@ namespace :buildpack do
1616

1717
desc "releases the next version of the buildpack"
1818
task :release do
19+
puts "Checking login state"
20+
sh("heroku whoami") do |out, status|
21+
if status.success?
22+
puts "Success"
23+
else
24+
raise "Ensure login works: `heroku login`"
25+
end
26+
end
27+
1928
deploy = DeployCheck.new(github: "heroku/heroku-buildpack-ruby")
2029
puts "Attempting to deploy #{deploy.next_version}, overwrite with RELEASE_VERSION env var"
2130
deploy.check!
22-
2331
if deploy.push_tag?
2432
sh("git tag -f #{deploy.next_version}") do |out, status|
2533
raise "Could not `git tag -f #{deploy.next_version}`: #{out}" unless status.success?

0 commit comments

Comments
 (0)