This commit is contained in:
Andras Bacsai
2022-12-07 12:17:06 +01:00
parent dcb29a80fe
commit 5e082c647c
13 changed files with 150 additions and 178 deletions

View File

@@ -32,13 +32,13 @@ export default async function ({
const url = htmlUrl.replace('https://', '').replace('http://', '');
if (forPublic) {
await saveBuildLog({
line: `Cloning ${repository}:${branch} branch`,
line: `Cloning ${repository}:${branch}...`,
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit`,
line: `Checking out ${gitCommitHash} commit...`,
buildId,
applicationId
});
@@ -72,13 +72,13 @@ export default async function ({
})
.json();
await saveBuildLog({
line: `Cloning ${repository}:${branch} branch`,
line: `Cloning ${repository}:${branch}...`,
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit`,
line: `Checking out ${gitCommitHash} commit...`,
buildId,
applicationId
});
@@ -90,6 +90,5 @@ export default async function ({
});
}
const { stdout: commit } = await executeCommand({ command: `cd ${workdir}/ && git rev-parse HEAD`, shell: true });
console.log({ commit })
return commit.replace('\n', '');
}

View File

@@ -1,5 +1,5 @@
import { saveBuildLog } from "../buildPacks/common";
import { executeCommand } from "../common";
import { executeCommand } from "../common";
export default async function ({
applicationId,
@@ -33,13 +33,13 @@ export default async function ({
}
await saveBuildLog({
line: `Cloning ${repository}:${branch} branch`,
line: `Cloning ${repository}:${branch}...`,
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit`,
line: `Checking out ${gitCommitHash} commit...`,
buildId,
applicationId
});