Skip to content

Commit

Permalink
fix!: Rename application
Browse files Browse the repository at this point in the history
Name changing is a breaking-change, but features are not changed.
  • Loading branch information
attakei committed Mar 10, 2024
1 parent 2636257 commit 7c4321d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
File renamed without changes.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "gazer"
name = "age"
version = "0.1.0"
edition = "2021"

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# gazer
# age

gazer is my bumpversion tool (for training Rust programming).
age is my bumpversion tool (for training Rust programming).

## Installation

```
cargo install --git https://github.com/attakei-lab/gazer.git
cargo install --git https://github.com/attakei-lab/age.git
```

## Usage

At first, you must generate configuration file -- `.gazer.toml`.
At first, you must generate configuration file -- `.age.toml`.
You should edit it for your current version, because generated file is set `current_version = "0.0.0"`.

```
gazer init
age init
```

If you want to up next version, run `gazer update|major|minor|patch`.
If you want to up next version, run `age update|major|minor|patch`.

* `update` accepts any semver.
* `major` is shortcut to major version updating of semver.
Expand All @@ -28,16 +28,16 @@ Example:

```console
# If current_version = "1.2.3"
> gazer major # Update to 2.0.0
> gazer minor # Update to 1.3.0
> gazer patch # Update to 1.2.4
> age major # Update to 2.0.0
> age minor # Update to 1.3.0
> age patch # Update to 1.2.4
```

## Configuration file

### `current_version`

Version value that gazer manages.
Version value that `age` manages.

### `files`

Expand Down
2 changes: 1 addition & 1 deletion src/commands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ use anyhow::Result;

pub fn execute() -> Result<()> {
let version = super::super::VERSION;
println!("Running gazer v{version}");
println!("Running age v{version}");
Ok(())
}
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::env::current_dir;
use std::fs::read_to_string;
use std::path::{Path, PathBuf};

pub const DEFAULT_FILENAME: &'static str = ".gazer.toml";
pub const DEFAULT_FILENAME: &'static str = ".age.toml";
pub const DEFAULT_VALUES: &'static str = r#"
current_version = "0.0.0"
Expand Down Expand Up @@ -55,9 +55,9 @@ impl FileConfig {
*/
pub fn find_config_path() -> Option<PathBuf> {
let pwd = current_dir().unwrap();
let _gazer_toml = pwd.join(Path::new(DEFAULT_FILENAME));
if _gazer_toml.exists() {
return Some(_gazer_toml);
let _main_toml = pwd.join(Path::new(DEFAULT_FILENAME));
if _main_toml.exists() {
return Some(_main_toml);
}
None
}
Expand Down

0 comments on commit 7c4321d

Please sign in to comment.