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

Handle destination files/paths/directories better #6

Merged
merged 1 commit into from Jan 6, 2019

Conversation

1 participant
@antifuchs
Copy link
Owner

antifuchs commented Jan 6, 2019

This PR refactors file creation a bit to enable tests, and fixes a few
issues:

  • Could not create a CI config file if none existed before (oops)
  • Could not create a CI config file if its containing dir didn't exist
  • Only created the CI config file relative to the current dir

Now, the first two problems are eliminated, and cargo template-ci
creates the config file relative to the Cargo.toml that it ended up
loading.

Improve template-ci's understanding of destination paths
Now, the CI configuration is created in the directory containing the
Cargo.toml file (expected to be a repository root). Also,
automatically creates missing directories and deals with missing
destination files.
@antifuchs

This comment has been minimized.

Copy link
Owner

antifuchs commented Jan 6, 2019

bors r+

bors bot added a commit that referenced this pull request Jan 6, 2019

Merge #6
6: Handle destination files/paths/directories better r=antifuchs a=antifuchs

This PR refactors file creation a bit to enable tests, and fixes a few
issues:

* Could not create a CI config file if none existed before (oops)
* Could not create a CI config file if its containing dir didn't exist
* Only created the CI config file relative to the current dir

Now, the first two problems are eliminated, and cargo template-ci
creates the config file relative to the Cargo.toml that it ended up
loading.

Co-authored-by: Andreas Fuchs <asf@boinkor.net>
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Jan 6, 2019

Build succeeded

@bors bors bot merged commit 9453b54 into master Jan 6, 2019

6 checks passed

bors Build succeeded
Details
ci/circleci: ci_success Your tests passed on CircleCI!
Details
ci/circleci: clippy Your tests passed on CircleCI!
Details
ci/circleci: rustfmt Your tests passed on CircleCI!
Details
ci/circleci: test-nightly Your tests passed on CircleCI!
Details
ci/circleci: test-stable Your tests passed on CircleCI!
Details

@bors bors bot deleted the nonexistent-config-files branch Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment