-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add --workspace option, add convenience binaries
- Loading branch information
1 parent
c8f5e61
commit fa94373
Showing
8 changed files
with
113 additions
and
86 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +0,0 @@ | ||
<!-- DO NOT EDIT --> | ||
<!-- This file is automatically generated by README.ts. --> | ||
<!-- Edit README.ts if you want to make changes. --> | ||
|
||
# Create Rust GitHub repo | ||
|
||
[](https://github.com/DenisGorbachev/create-rust-github-repo) | ||
[](https://docs.rs/create-rust-github-repo) | ||
|
||
## Overview | ||
|
||
`create-rust-github-repo` is a CLI program that creates a new repository on GitHub, clones it locally, initializes a Rust project, copies the configs from a pre-existing directory. | ||
|
||
## Examples | ||
|
||
```shell | ||
# Create a GitHub repo & init a Rust project | ||
create-rust-github-repo --name my-new-project | ||
|
||
# Copy configs from existing project | ||
create-rust-github-repo --name my-new-project --copy-configs-from ~/workspace/my-existing-project | ||
|
||
# Clone to a specific directory | ||
create-rust-github-repo --name my-new-project --dir ~/workspace/my-new-project | ||
|
||
# Create a public repo | ||
create-rust-github-repo --name my-new-project --public | ||
|
||
# Create a lib instead of bin | ||
create-rust-github-repo --name my-new-project --cargo-init-args '--lib' | ||
``` | ||
|
||
## Features | ||
|
||
* Uses existing `gh`, `git`, `cargo` commands | ||
* Forwards the flags to commands | ||
* Can be used as a library | ||
|
||
## Installation | ||
|
||
```shell | ||
cargo install create-rust-github-repo | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
Usage: create-rust-github-repo [OPTIONS] --name <NAME> | ||
Options: | ||
-n, --name <NAME> | ||
Repository name | ||
-d, --dir <DIR> | ||
Target directory for cloning the repository (must include the repo name) (defaults to "{current_dir}/{repo_name}") | ||
-v, --visibility <VISIBILITY> | ||
Repository visibility [default: private] [possible values: public, private, internal] | ||
-c, --copy-configs-from <COPY_CONFIGS_FROM> | ||
Source directory for configuration files | ||
--git-commit-message <GIT_COMMIT_MESSAGE> | ||
Message for git commit [default: "Add configs"] | ||
--extra-configs <EXTRA_CONFIGS> | ||
Extra config file paths (relative to `source` directory) | ||
--gh-repo-create-args <GH_REPO_CREATE_ARGS> | ||
Forwarded arguments for `gh repo create` | ||
--gh-repo-clone-args <GH_REPO_CLONE_ARGS> | ||
Forwarded arguments for `gh repo clone` | ||
--cargo-init-args <CARGO_INIT_ARGS> | ||
Forwarded arguments for `cargo init` | ||
--cargo-build-args <CARGO_BUILD_ARGS> | ||
Forwarded arguments for `cargo build` | ||
--git-commit-args <GIT_COMMIT_ARGS> | ||
Forwarded arguments for `git commit` | ||
--git-push-args <GIT_PUSH_ARGS> | ||
Forwarded arguments for `git push` | ||
-h, --help | ||
Print help | ||
``` | ||
|
||
## License | ||
|
||
[Apache License 2.0](LICENSE-APACHE) or [MIT License](LICENSE-MIT) at your option. | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use clap::Parser; | ||
use create_rust_github_repo::{CreateRustGithubRepo, RepoVisibility}; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
CreateRustGithubRepo::parse() | ||
.visibility(RepoVisibility::Private) | ||
.cargo_init_args(["--bin".to_string()]) | ||
.run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use clap::Parser; | ||
use create_rust_github_repo::{CreateRustGithubRepo, RepoVisibility}; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
CreateRustGithubRepo::parse() | ||
.visibility(RepoVisibility::Private) | ||
.cargo_init_args(["--lib".to_string()]) | ||
.run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use clap::Parser; | ||
use create_rust_github_repo::{CreateRustGithubRepo, RepoVisibility}; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
CreateRustGithubRepo::parse() | ||
.visibility(RepoVisibility::Public) | ||
.cargo_init_args(["--bin".to_string()]) | ||
.run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use clap::Parser; | ||
use create_rust_github_repo::{CreateRustGithubRepo, RepoVisibility}; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
CreateRustGithubRepo::parse() | ||
.visibility(RepoVisibility::Public) | ||
.cargo_init_args(["--lib".to_string()]) | ||
.run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters