diff --git a/openshift/release/update-to-head.sh b/openshift/release/update-to-head.sh index fe6ad17ad5..98f92cb748 100755 --- a/openshift/release/update-to-head.sh +++ b/openshift/release/update-to-head.sh @@ -49,6 +49,12 @@ if [[ -d openshift/overrides ]]; then cp -r openshift/overrides/. . rm -rf openshift/overrides fi +# Apply midstream patches using scripts +if [[ -d openshift/scripts ]]; then + for script in openshift/scripts/*.sh; do + "$script" + done +fi git add . make generate/zz_filesystem_generated.go diff --git a/openshift/scripts/generate-tekton-pac.sh b/openshift/scripts/generate-tekton-pac.sh new file mode 100755 index 0000000000..373ddbbd81 --- /dev/null +++ b/openshift/scripts/generate-tekton-pac.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +FUNC_S2I="pkg/pipelines/resources/tekton/task/func-s2i/0.1/func-s2i" +FUNC_BUILDPACKS="pkg/pipelines/resources/tekton/task/func-buildpacks/0.2/func-buildpacks" +FUNC_DEPLOY="pkg/pipelines/resources/tekton/task/func-deploy/0.1/func-deploy" + +sed -e 's/^kind: .*/kind: Task/' "${FUNC_S2I}.yaml" > "${FUNC_S2I}-pac.yaml" +sed -e 's/^kind: .*/kind: Task/' "${FUNC_BUILDPACKS}.yaml" > "${FUNC_BUILDPACKS}-pac.yaml" +sed -e 's/^kind: .*/kind: Task/' "${FUNC_DEPLOY}.yaml" > "${FUNC_DEPLOY}-pac.yaml"