Skip to content

Commit

Permalink
Build file resources using separate shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Nov 11, 2024
1 parent 838b7fa commit e3597f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ interface BuildDockerImageParams {

async function buildFileResource(plan: BuildPlan): Promise<void> {
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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
*)
Expand All @@ -17,4 +16,4 @@ function build_resource() {
esac
}

build_resource "$1" "$2"
build_resource "$1"

0 comments on commit e3597f2

Please sign in to comment.