Skip to content

Commit 04f1c8b

Browse files
committed
2 parents 36c78b7 + 08013c5 commit 04f1c8b

7 files changed

Lines changed: 25 additions & 5 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
path: /usr/local/bin/shfmt
3535
# key: ${{ runner.os }}-shfmt-${{ env.SHFMT_VERSION }}
3636
key: ${{ runner.os }}-shfmt-
37+
restore-keys: |
38+
${{ runner.os }}-shfmt-
3739
3840
- name: Cache Pre-Commit environments
3941
uses: actions/cache@v3

.github/workflows/release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ jobs:
4444
with:
4545
path: |
4646
target
47-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
47+
# key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
48+
key: ${{ runner.os }}-cargo-
49+
restore-keys: |
50+
${{ runner.os }}-cargo-
4851
4952
- name: Build Release
5053
run: cargo build --release

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cpa"
3-
version = "0.0.3"
3+
version = "0.0.4"
44
edition = "2018"
55

66
[dependencies]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ curl -sSL https://raw.githubusercontent.com/ysawa0/create-python-app/main/instal
2121
```bash
2222
# cpa will be installed to ~/bin/cpa
2323
# add ~/bin to your PATH
24+
# eg: echo "export PATH=$PATH:~/bin" >> ~/.zshrc
2425
```
2526

2627
### Windows

src/main.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@ use clap::Parser;
44
use python::setup_preset;
55

66
#[derive(Parser)]
7-
#[command(name = "cpa", version)]
7+
#[clap(
8+
name = "cpa",
9+
version,
10+
about = "CPA helps you set up new projects, ultra fast",
11+
long_about = "CPA is a cli tool designed to expedite the setup of new projects by automating the creation of various configuration files."
12+
)]
813
enum Cli {
14+
#[clap(
15+
about = "Create a new project",
16+
long_about = "Create a new project using specified preset."
17+
)]
918
Create(CreateArgs),
19+
#[clap(
20+
about = "Update existing project",
21+
long_about = "Overwrite existing current working dir with CPA preset."
22+
)]
1023
Update(UpdateArgs),
1124
}
1225

@@ -32,7 +45,7 @@ fn main() {
3245
if args.preset.starts_with("python") {
3346
setup_preset(args.preset, args.name, true);
3447
} else {
35-
eprintln!("Preset: {:?} not supported yet", args.preset);
48+
eprintln!("Preset: {:?} not supported", args.preset);
3649
}
3750
}
3851
Cli::Update(args) => {

src/python.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,5 @@ pub fn setup_preset(mut preset: String, name: String, create: bool) {
152152
f_pyproj
153153
.write_all(out_pyproj.as_bytes())
154154
.expect("Could not write to file");
155+
println!("Project created at: {}", prefix)
155156
}

0 commit comments

Comments
 (0)