Skip to content

Commit

Permalink
Updated version to v0.0.3+1
Browse files Browse the repository at this point in the history
  • Loading branch information
Test Name committed Aug 21, 2024
1 parent 9ab10a1 commit 5b75ac7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.3] - 2024-08-20
## [0.0.3+1] - 2024-08-21

### Changed
- Commented all debug Printf
- Updated README.md to include a ToDo that should serve as a roadmap

## [0.0.3] - 2024-08-21

### Added
- Verbose mode with --verbose flag for detailed command execution information
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ chicle is a platform-agnostic command-line tool for managing multiple Git identi
- Version checking functionality
- Verbose mode for detailed output

## ToDo
- Configure default behaviors
- Edit existing identities
- Move/copy existing identities

## Installation

### Using Homebrew
Expand Down Expand Up @@ -129,12 +134,6 @@ chicle list

Alias: `chicle ls`

### Configure default behaviors

```bash
chicle config --always-global
```

### Check chicle version

```bash
Expand Down
20 changes: 10 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// Version of the chicle tool
const Version = "0.0.3"
const Version = "0.0.3+1"

// UserConfig stores the configuration for each Git identity
type UserConfig struct {
Expand Down Expand Up @@ -163,8 +163,8 @@ func switchCommand() *cli.Command {
break
}
}
fmt.Printf("Debug: Inside switch command action, isGlobal: %v\n", isGlobal)
fmt.Printf("Debug: All args: %v\n", os.Args)
//fmt.Printf("Debug: Inside switch command action, isGlobal: %v\n", isGlobal)
//fmt.Printf("Debug: All args: %v\n", os.Args)
return switchUser(c, isGlobal)
},
}
Expand Down Expand Up @@ -310,23 +310,23 @@ func switchUser(c *cli.Context, isGlobal bool) error {
}
alias := args.First()

fmt.Printf("Debug: switchUser called with alias: %s, isGlobal: %v\n", alias, isGlobal)
fmt.Printf("Debug: All args: %v\n", os.Args)
fmt.Printf("Debug: Global configs: %+v\n", configs.Global)
fmt.Printf("Debug: Local configs: %+v\n", configs.Local)
//fmt.Printf("Debug: switchUser called with alias: %s, isGlobal: %v\n", alias, isGlobal)
//fmt.Printf("Debug: All args: %v\n", os.Args)
//fmt.Printf("Debug: Global configs: %+v\n", configs.Global)
//fmt.Printf("Debug: Local configs: %+v\n", configs.Local)

var config UserConfig
var ok bool

if isGlobal {
fmt.Println("Debug: Checking global configs")
//fmt.Println("Debug: Checking global configs")
config, ok = configs.Global[alias]
} else {
fmt.Println("Debug: Checking local configs")
//fmt.Println("Debug: Checking local configs")
config, ok = configs.Local[alias]
}

fmt.Printf("Debug: Config found: %v, Config: %+v\n", ok, config)
//fmt.Printf("Debug: Config found: %v, Config: %+v\n", ok, config)

if !ok {
scopeType := map[bool]string{true: "global", false: "local"}[isGlobal]
Expand Down

0 comments on commit 5b75ac7

Please sign in to comment.