From 425d737d4aebee0c7295753a1ebb242e7fcbf8c8 Mon Sep 17 00:00:00 2001 From: Ali Naqvi Date: Mon, 18 Dec 2023 11:17:29 +0800 Subject: [PATCH] feat: Build to retrieve individual entry point commit and forward to cloud build service --- src/placeos-build/cli/build.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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