@@ -12,14 +12,14 @@ TAG="$1"
1212
1313SOURCE_TOML_FILE=" obelisk-local.toml"
1414TARGET_TOML_FILE=" obelisk-oci.toml"
15- # Determine COMPONENT_TYPE from the current directory name prefix
15+ # Determine $TOML_COMPONENT_TYPE from the current directory name prefix
1616DIR_NAME=$( basename " $PWD " )
1717if [[ " $DIR_NAME " == activity-* ]]; then
18- COMPONENT_TYPE =" activity_wasm"
18+ TOML_COMPONENT_TYPE =" activity_wasm"
1919elif [[ " $DIR_NAME " == webhook-* ]]; then
20- COMPONENT_TYPE= " webhook_endpoint "
20+ TOML_COMPONENT_TYPE= " webhook_endpoint_wasm "
2121elif [[ " $DIR_NAME " == workflow-* ]]; then
22- COMPONENT_TYPE= " workflow "
22+ TOML_COMPONENT_TYPE= " workflow_wasm "
2323else
2424 echo " Error: directory '${DIR_NAME} ' does not start with a known prefix (activity-, webhook-, workflow-)" >&2
2525 exit 1
@@ -36,7 +36,7 @@ push() {
3636 OUTPUT=" dryrun"
3737 fi
3838 # Replace the old location with the actual OCI location
39- obelisk component add ${COMPONENT_TYPE } ${OUTPUT} --name ${FILE_NAME_WITHOUT_EXT} -c $TARGET_TOML_FILE
39+ obelisk component add ${TOML_COMPONENT_TYPE } ${OUTPUT} --name ${FILE_NAME_WITHOUT_EXT} -c $TARGET_TOML_FILE
4040}
4141
4242cp " $SOURCE_TOML_FILE " " $TARGET_TOML_FILE "
@@ -49,8 +49,8 @@ while IFS= read -r line; do
4949 raw_path=${line#* \" }
5050 raw_path=${raw_path% \" * }
5151
52- # interpolate ${OBELISK_TOML_DIR }
53- path=${raw_path// \$\{ OBELISK_TOML_DIR \} / $OBELISK_TOML_DIR_VALUE }
52+ # interpolate ${DEPLOYMENT_DIR }
53+ path=${raw_path// \$\{ DEPLOYMENT_DIR \} / $OBELISK_TOML_DIR_VALUE }
5454
5555 push $path
5656
0 commit comments