diff --git a/src/placeos-build/cli/build.cr b/src/placeos-build/cli/build.cr index 8919c92..fe80419 100644 --- a/src/placeos-build/cli/build.cr +++ b/src/placeos-build/cli/build.cr @@ -68,7 +68,8 @@ module PlaceOS::Build password: password, ) end - PlaceOS::Build.call_cloud_build_service(repository_uri, branch, entrypoint, ref, username: username, password: password) + commit = repository_store.file_commits?(entrypoint, repository_uri, 1, branch, username, password).try &.first.commit || ref + PlaceOS::Build.call_cloud_build_service(repository_uri, branch, entrypoint, commit, username: username, password: password) rescue e Log.warn(exception: e) { "failed to compile #{entrypoint}" } end