File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 77 Hatchet ::Runner . new ( 'non-clojure-app' , allow_failure : true ) . tap do |app |
88 app . deploy do
99 expect ( app ) . not_to be_deployed
10- expect ( app . output ) . to include ( "Could not find a 'project.clj' file! Please ensure it exists and is checked into Git." )
10+ expect ( clean_output ( app . output ) ) . to eq ( <<~OUTPUT )
11+ remote: -----> App not compatible with buildpack: $BUILDPACK_URL
12+ remote: Could not find a 'project.clj' file! Please ensure it exists and is checked into Git.
13+
14+ remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
15+
16+ remote: ! Push failed
17+ OUTPUT
1118 end
1219 end
1320 end
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ def http_get(app, options = {})
4949def find_output_start_index ( lines )
5050 # Find the first "app detected" line. This skips the buildpack list at the beginning which will contain a GitHub URL
5151 # for the buildpack under test that will be different for each PR/branch under test.
52- lines . index { |line | line . match? ( /-----> .* app detected/ ) }
52+ # For detection failures, look for the "App not compatible" line instead.
53+ lines . index { |line | line . match? ( /-----> .* app detected|-----> App not compatible with buildpack/ ) }
5354end
5455
5556def find_output_end_index ( lines )
@@ -82,6 +83,8 @@ def clean_output(output)
8283 %r{/tmp/build_[0-9a-f]{8}} => '$BUILD_DIR' ,
8384 # Build id
8485 /build_[0-9a-f]{8}/ => '$BUILD_ID' ,
86+ # Buildpack URL in detection failure message
87+ %r{https://github\. com/heroku/heroku-buildpack-clojure#[\w \- /]+} => '$BUILDPACK_URL' ,
8588
8689 ##################################################
8790 # Java
You can’t perform that action at this time.
0 commit comments