Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update condition to copy sample hooks #723

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kiliczsh
Copy link

If .kamal/hooks file exists but sample hooks are deleted. kamal init command is not creating sample hooks.

Results for /bin/test

Finished in 274.016546s, 1.5291 runs/s, 4.6713 assertions/s.
419 runs, 1280 assertions, 0 failures, 0 errors, 0 skips

Step 1:

kamal init
Created configuration file in config/deploy.yml 
Created sample hooks in .kamal/hooks

Step 2:

git status
 On branch main
 Changes to be committed:
   (use "git restore --staged <file>..." to unstage)
 	new file:   .kamal/hooks/post-deploy.sample
 	new file:   .kamal/hooks/post-traefik-reboot.sample
 	new file:   .kamal/hooks/pre-build.sample
 	new file:   .kamal/hooks/pre-connect.sample
 	new file:   .kamal/hooks/pre-deploy.sample
 	new file:   .kamal/hooks/pre-traefik-reboot.sample
 	new file:   config/deploy.yml

Delete sample hook files now. Keep the folder.

Step 3:

kamal init
Created configuration file in config/deploy.yml

Delete folder as well.

Step 4:

kamal init
Config file already exists in config/deploy.yml (remove first to create a new one)
Created sample hooks in .kamal/hooks

If .kamal/hooks file exists but sample hooks are deleted. `kamal init` command is not creating sample hooks.
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.

1 participant