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

fix: secrets not archived in workspace crates #785

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Apr 11, 2023

Description of change

This PR ensures that not only Secrets.toml's in the workspace root are included in the archive, but also Secrets.toml's in crates in the workspace (even if .gitignored).

TODO: fix static files not working in workspace projects. Static folders must be placed in the root of the workspace.

How Has This Been Tested (if applicable)?

By running deployer locally.

let secrets_path = dir_entry.path().join("Secrets.toml");

// Make sure to add any `Secrets.toml` files in the subdirectories.
if secrets_path.exists() {
Copy link
Contributor

@iulianbarbu iulianbarbu Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check this path points to a file and not a directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to since we join Secrets.toml to it. I think it is technically still a valid directory name, but in the event that anyone names a dir in their project Secrets.toml I think it will just be added as an empty dir to the archive.

Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@oddgrd oddgrd merged commit 6312e53 into shuttle-hq:main Apr 11, 2023
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.

3 participants