Skip to content

feat: add init.sh post-initialization script (#88)#158

Open
boxcee-interview wants to merge 1 commit intocrossplane:mainfrom
boxcee-interview:fix/issue-88-add-init-script-v2
Open

feat: add init.sh post-initialization script (#88)#158
boxcee-interview wants to merge 1 commit intocrossplane:mainfrom
boxcee-interview:fix/issue-88-add-init-script-v2

Conversation

@boxcee-interview
Copy link
Copy Markdown

Closes #88

Add a post-initialization script that replaces all instances of
crossplane/function-template-python in the repository with the user's
own function name. This enables xpkg init to correctly set up the
template after cloning.

Changes in this PR:

  • Added init.sh post-initialization script that runs automatically
    during xpkg init
  • Replaces crossplane/function-template-python in:
    • package/crossplane.yaml (the Function resource name)
    • example/aws-loadbalancer-kube-proxy-provider.yaml
    • example/aws-s3-bucket-provider.yaml

How to Test

  1. Run xpkg init crossplane/function-template-python --target my-function
  2. Verify that package/crossplane.yaml and example/*.yaml are replaced with the new function name

Add a post-initialization script that replaces all instances of
function-template-python with the user's function name in:
- package/crossplane.yaml (the Function resource name)
- example/*.yaml (example function references)

This enables the Crossplane CLI's xpkg init command to properly
initialize the template by running the init.sh hook automatically.

Fixes crossplane#88

Signed-off-by: Moritz Schmitz von Hülst <mschmitzvonhuelst@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing Post-initialization hooks for init commands

1 participant