Skip to content

Commit 95fb12c

Browse files
committed
renamed all command to repo
1 parent fd6e374 commit 95fb12c

7 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ jobs:
5252
run: |
5353
choco install zip
5454
cd target/${{ matrix.target }}/release
55-
zip gstats-0.1.1-${{ matrix.target }}.zip gstats.exe
55+
zip gstats-0.1.2-${{ matrix.target }}.zip gstats.exe
5656
cd ../../..
5757
5858
- name: Create tar.gz file on macOS
5959
if: ${{ matrix.os == 'macos-latest' }}
6060
run: |
6161
chmod +x target/${{ matrix.target }}/release/gstats
62-
tar -zcf target/${{ matrix.target }}/release/gstats-0.1.1-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release gstats
62+
tar -zcf target/${{ matrix.target }}/release/gstats-0.1.2-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release gstats
6363
chmod +x target/${{ matrix.target2 }}/release/gstats
64-
tar -zcf target/${{ matrix.target2 }}/release/gstats-0.1.1-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release gstats
64+
tar -zcf target/${{ matrix.target2 }}/release/gstats-0.1.2-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release gstats
6565
6666
- name: Upload release and assets to GitHub
6767
uses: svenstaro/upload-release-action@v2
6868
with:
6969
repo_token: ${{ secrets.GITHUB_TOKEN }}
70-
tag: "release-0.1.1-${{ github.run_number }}"
71-
release_name: gstats 0.1.1
70+
tag: "release-0.1.2-${{ github.run_number }}"
71+
release_name: gstats 0.1.2
7272
file_glob: true
73-
file: target/*/release/gstats-0.1.1-*.{zip,tar.gz}
73+
file: target/*/release/gstats-0.1.2-*.{zip,tar.gz}

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 = "github-stats"
3-
version = "0.1.0"
3+
version = "0.1.2"
44
edition = "2021"
55
authors = ["cqb13 <cqb13.dev@gmail.com>"]
66
license = "MIT"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ COMMANDS:
5353
Displays the current version of github-stats
5454
install -
5555
Installs the files and directories
56-
all -
56+
repo -
5757
Gives all stats found on a repository as json
5858
-u --user <USER> The user who owns the repository
5959
-r --repository <REPOSITORY> Name of the repository

src/commands/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub mod all;
1+
pub mod relations;
22
pub mod releases;
3+
pub mod repo;
34
pub mod user;
4-
pub mod relations;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::utils::{pretty_dates, request, write_to_file};
22
use serde_json::Value;
33
use std::path::PathBuf;
44

5-
pub fn all_command(owner: String, repo: String, output: Option<PathBuf>, display: bool) {
5+
pub fn repo_command(owner: String, repo: String, output: Option<PathBuf>, display: bool) {
66
let url = format!("https://api.github.com/repos/{}/{}", owner, repo);
77

88
let json = request(url).expect("Failed to request data");

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ pub mod commands;
33
pub mod utils;
44

55
use crate::cli::{Arg, Cli, Command};
6-
use crate::commands::all::all_command;
76
use crate::commands::relations::{relations_command, RelationType};
87
use crate::commands::releases::releases_command;
8+
use crate::commands::repo::repo_command;
99
use crate::commands::user::user_command;
1010
use crate::utils::{install, validate_and_convert_path, OS};
1111

1212
fn main() {
1313
let cli = Cli::new().with_default_command("help").with_commands(vec![
1414
Command::new("version", "Displays the current version of github-stats").with_short('v'),
1515
Command::new("install", "Installs the files and directories"),
16-
Command::new("all", "Gives all stats found on a repository as json")
16+
Command::new("repo", "Gives all stats found on a repository as json")
1717
.with_arg(
1818
Arg::new()
1919
.with_name("user")
@@ -202,15 +202,15 @@ fn main() {
202202

203203
install(&os);
204204
}
205-
"all" => {
205+
"repo" => {
206206
let user = command.get_value_of("user").throw_if_none();
207207
let repo = command.get_value_of("repository").throw_if_none();
208208
let output = command.get_value_of("output").to_option();
209209
let display = command.has("display");
210210

211211
let output = output_to_path(output);
212212

213-
all_command(user, repo, output, display);
213+
repo_command(user, repo, output, display);
214214
}
215215
"releases" => {
216216
let user = command.get_value_of("user").throw_if_none();

0 commit comments

Comments
 (0)