mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Update docker_test to checkout specific branch by default (#20684)
Previously, FETCH_HEAD would always point to tests-passed because our base docker image was configured to only fetch the tests-passed branch. Since https://github.com/discourse/discourse_docker/commit/53bbacc882, we switched to a partial clone which means that `git fetch; git checkout FETCH_HEAD` will checkout whichever remote branch is the first alphabetically. This commit makes the checkout more specific to avoid this issue.
This commit is contained in:
@@ -23,7 +23,7 @@ unless ENV["NO_UPDATE"]
|
|||||||
run_or_fail("git reset --hard")
|
run_or_fail("git reset --hard")
|
||||||
run_or_fail("git fetch")
|
run_or_fail("git fetch")
|
||||||
|
|
||||||
checkout = ENV["COMMIT_HASH"] || "FETCH_HEAD"
|
checkout = ENV["COMMIT_HASH"] || "origin/tests-passed"
|
||||||
run_or_fail("LEFTHOOK=0 git checkout #{checkout}")
|
run_or_fail("LEFTHOOK=0 git checkout #{checkout}")
|
||||||
|
|
||||||
run_or_fail("bundle")
|
run_or_fail("bundle")
|
||||||
|
Reference in New Issue
Block a user