diff --git a/src/build.ts b/src/build.ts index d81307cf..101021ac 100644 --- a/src/build.ts +++ b/src/build.ts @@ -137,7 +137,7 @@ interface BuildDockerImageParams { async function buildFileResource(plan: BuildPlan): Promise { core.startGroup(`Build resource {plan.name}`) - await exec.exec('./build-resource.sh', [plan.name, plan.source_file], { + await exec.exec(`./build-${plan.name}.sh`, [plan.source_file], { cwd: plan.source_directory }) core.endGroup() diff --git a/tests/workflows/integration/test-upload-charm/build-resource.sh b/tests/workflows/integration/test-upload-charm/build-test-file.sh similarity index 71% rename from tests/workflows/integration/test-upload-charm/build-resource.sh rename to tests/workflows/integration/test-upload-charm/build-test-file.sh index d1877181..f59f8046 100755 --- a/tests/workflows/integration/test-upload-charm/build-resource.sh +++ b/tests/workflows/integration/test-upload-charm/build-test-file.sh @@ -3,11 +3,10 @@ set -eu function build_resource() { - local RESOURCE=$1 - local RESOURCE_OUTPUT=$2 + local RESOURCE_OUTPUT=$1 case $RESOURCE in - test-file) + test-file.txt) touch "$RESOURCE_OUTPUT" ;; *) @@ -17,4 +16,4 @@ function build_resource() { esac } -build_resource "$1" "$2" \ No newline at end of file +build_resource "$1" \ No newline at end of file