Skip to content

Commit 26ff7ff

Browse files
committed
build: Fix push-components.sh
1 parent 65cdbe3 commit 26ff7ff

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

scripts/push-components.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ TAG="$1"
1212

1313
SOURCE_TOML_FILE="obelisk-local.toml"
1414
TARGET_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
1616
DIR_NAME=$(basename "$PWD")
1717
if [[ "$DIR_NAME" == activity-* ]]; then
18-
COMPONENT_TYPE="activity_wasm"
18+
TOML_COMPONENT_TYPE="activity_wasm"
1919
elif [[ "$DIR_NAME" == webhook-* ]]; then
20-
COMPONENT_TYPE="webhook_endpoint"
20+
TOML_COMPONENT_TYPE="webhook_endpoint_wasm"
2121
elif [[ "$DIR_NAME" == workflow-* ]]; then
22-
COMPONENT_TYPE="workflow"
22+
TOML_COMPONENT_TYPE="workflow_wasm"
2323
else
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

4242
cp "$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

Comments
 (0)