From 6fa8becd917fdc48aa3e1f2fa9d8080365b95034 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 29 May 2025 14:59:32 -0700 Subject: [PATCH 01/12] adding initial move flag logic (#127) --- flags/pokemonflagset.go | 63 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/flags/pokemonflagset.go b/flags/pokemonflagset.go index c9330976..5a7cb92c 100644 --- a/flags/pokemonflagset.go +++ b/flags/pokemonflagset.go @@ -13,8 +13,10 @@ import ( "golang.org/x/text/language" "image" "io" + "log" "net/http" "os" + "sort" "strings" ) @@ -33,7 +35,7 @@ func header(header string) string { return output.String() } -func SetupPokemonFlagSet() (*flag.FlagSet, *bool, *bool, *string, *string, *bool, *bool, *bool, *bool) { +func SetupPokemonFlagSet() (*flag.FlagSet, *bool, *bool, *string, *string, *bool, *bool, *bool, *bool, *bool, *bool) { pokeFlags := flag.NewFlagSet("pokeFlags", flag.ExitOnError) abilitiesFlag := pokeFlags.Bool("abilities", false, "Print the Pokémon's abilities") @@ -42,6 +44,9 @@ func SetupPokemonFlagSet() (*flag.FlagSet, *bool, *bool, *string, *string, *bool imageFlag := pokeFlags.String("image", "", "Print the Pokémon's default sprite") shortImageFlag := pokeFlags.String("i", "", "Print the Pokémon's default sprite") + moveFlag := pokeFlags.Bool("moves", false, "Print the Pokémon's learnable moves") + shortMoveFlag := pokeFlags.Bool("m", false, "Print the Pokémon's learnable moves") + statsFlag := pokeFlags.Bool("stats", false, "Print the Pokémon's base stats") shortStatsFlag := pokeFlags.Bool("s", false, "Print the Pokémon's base stats") @@ -56,6 +61,7 @@ func SetupPokemonFlagSet() (*flag.FlagSet, *bool, *bool, *string, *string, *bool fmt.Sprintf("\n\t%-30s %s", "-a, --abilities", "Prints the Pokémon's abilities."), fmt.Sprintf("\n\t%-30s %s", "-i=xx, --image=xx", "Prints out the Pokémon's default sprite."), fmt.Sprintf("\n\t%5s%-15s", "", hintMessage), + fmt.Sprintf("\n\t%-30s %s", "-m, --moves", "Prints the Pokemon's learnable moves."), fmt.Sprintf("\n\t%-30s %s", "-s, --stats", "Prints the Pokémon's base stats."), fmt.Sprintf("\n\t%-30s %s", "-t, --types", "Prints the Pokémon's typing."), fmt.Sprintf("\n\t%-30s %s", "-h, --help", "Prints the help menu."), @@ -63,7 +69,7 @@ func SetupPokemonFlagSet() (*flag.FlagSet, *bool, *bool, *string, *string, *bool fmt.Println(helpMessage) } - return pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag + return pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, moveFlag, shortMoveFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag } func AbilitiesFlag(w io.Writer, endpoint string, pokemonName string) error { @@ -198,6 +204,59 @@ func ImageFlag(w io.Writer, endpoint string, pokemonName string, size string) er return nil } +func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { + baseURL := "https://pokeapi.co/api/v2/" + pokemonStruct, _, _, _, _, _ := connections.PokemonApiCall(endpoint, pokemonName, baseURL) + + type MoveInfo struct { + Accuracy int + Level int + Name string + Power int + Type string + } + + _, err := fmt.Fprintln(w, header("Moves")) + if err != nil { + return err + } + + var moves []MoveInfo + + for _, pokeMove := range pokemonStruct.Moves { + for _, detail := range pokeMove.VersionGroupDetails { + if detail.VersionGroup.Name == "scarlet-violet" && detail.MoveLearnedMethod.Name == "level-up" { + moveName := pokeMove.Move.Name + moveStruct, _, err := connections.MoveApiCall("move", moveName, baseURL) + if err != nil { + log.Printf("Error fetching move %s: %v", moveName, err) + continue // Skip moves that fail to fetch + } + + moves = append(moves, MoveInfo{ + Accuracy: moveStruct.Accuracy, + Level: detail.LevelLearnedAt, + Name: moveName, + Power: moveStruct.Power, + Type: moveStruct.Type.Name, + }) + } + } + } + + // Sort moves by Level in ascending order + sort.Slice(moves, func(i, j int) bool { + return moves[i].Level < moves[j].Level + }) + + // Print formatted output + for _, m := range moves { + fmt.Fprintf(w, "%s - Level: %d, Power: %d // Acc: %d -- %s\n", m.Name, m.Level, m.Power, m.Accuracy, m.Type) + } + + return nil +} + func StatsFlag(w io.Writer, endpoint string, pokemonName string) error { baseURL := "https://pokeapi.co/api/v2/" pokemonStruct, _, _, _, _, _ := connections.PokemonApiCall(endpoint, pokemonName, baseURL) From 01d0bf780a76c738e9549fefa5c328fe6a105dcb Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 29 May 2025 15:00:04 -0700 Subject: [PATCH 02/12] updating PokemonJSONStruct with move data (#127) --- structs/structs.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/structs/structs.go b/structs/structs.go index a7786b5f..5a650bda 100644 --- a/structs/structs.go +++ b/structs/structs.go @@ -83,6 +83,23 @@ type PokemonJSONStruct struct { Hidden bool `json:"hidden"` Slot int `json:"slot"` } `json:"abilities"` + Moves []struct { + Move struct { + Name string `json:"name"` + URL string `json:"url"` + } `json:"move"` + VersionGroupDetails []struct { + LevelLearnedAt int `json:"level_learned_at"` + MoveLearnedMethod struct { + Name string `json:"name"` + URL string `json:"url"` + } `json:"move_learn_method"` + VersionGroup struct { + Name string `json:"name"` + URL string `json:"url"` + } `json:"version_group"` + } `json:"version_group_details"` + } `json:"moves"` Types []struct { Slot int `json:"slot"` Type struct { From 47e90b2cacb52fbaecb7e562e783d01b8493c89a Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 29 May 2025 22:36:20 -0700 Subject: [PATCH 03/12] putting move data into a table (#127) --- flags/pokemonflagset.go | 71 ++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/flags/pokemonflagset.go b/flags/pokemonflagset.go index 5a7cb92c..aedcb3f5 100644 --- a/flags/pokemonflagset.go +++ b/flags/pokemonflagset.go @@ -6,6 +6,7 @@ import ( "flag" "fmt" "github.com/charmbracelet/lipgloss" + "github.com/charmbracelet/lipgloss/table" "github.com/digitalghost-dev/poke-cli/connections" "github.com/digitalghost-dev/poke-cli/styling" "github.com/disintegration/imaging" @@ -17,6 +18,7 @@ import ( "net/http" "os" "sort" + "strconv" "strings" ) @@ -208,6 +210,11 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { baseURL := "https://pokeapi.co/api/v2/" pokemonStruct, _, _, _, _, _ := connections.PokemonApiCall(endpoint, pokemonName, baseURL) + _, err := fmt.Fprintln(w, header("Moves")) + if err != nil { + return err + } + type MoveInfo struct { Accuracy int Level int @@ -216,44 +223,62 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { Type string } - _, err := fmt.Fprintln(w, header("Moves")) - if err != nil { - return err - } - var moves []MoveInfo for _, pokeMove := range pokemonStruct.Moves { for _, detail := range pokeMove.VersionGroupDetails { - if detail.VersionGroup.Name == "scarlet-violet" && detail.MoveLearnedMethod.Name == "level-up" { - moveName := pokeMove.Move.Name - moveStruct, _, err := connections.MoveApiCall("move", moveName, baseURL) - if err != nil { - log.Printf("Error fetching move %s: %v", moveName, err) - continue // Skip moves that fail to fetch - } - - moves = append(moves, MoveInfo{ - Accuracy: moveStruct.Accuracy, - Level: detail.LevelLearnedAt, - Name: moveName, - Power: moveStruct.Power, - Type: moveStruct.Type.Name, - }) + if detail.VersionGroup.Name != "scarlet-violet" || detail.MoveLearnedMethod.Name != "level-up" { + continue + } + + moveName := pokeMove.Move.Name + moveStruct, _, err := connections.MoveApiCall("move", moveName, baseURL) + if err != nil { + log.Printf("Error fetching move %s: %v", moveName, err) + continue } + + moves = append(moves, MoveInfo{ + Accuracy: moveStruct.Accuracy, + Level: detail.LevelLearnedAt, + Name: moveName, + Power: moveStruct.Power, + Type: moveStruct.Type.Name, + }) } } - // Sort moves by Level in ascending order + if len(moves) == 0 { + fmt.Fprintln(w, "No level-up moves found for Scarlet & Violet.") + return nil + } + + // Sort by level sort.Slice(moves, func(i, j int) bool { return moves[i].Level < moves[j].Level }) - // Print formatted output + // Convert to table rows + var rows [][]string for _, m := range moves { - fmt.Fprintf(w, "%s - Level: %d, Power: %d // Acc: %d -- %s\n", m.Name, m.Level, m.Power, m.Accuracy, m.Type) + rows = append(rows, []string{ + m.Name, + m.Type, + strconv.Itoa(m.Accuracy), + strconv.Itoa(m.Level), + strconv.Itoa(m.Power), + }) } + // Build and print table + color := lipgloss.AdaptiveColor{Light: "#4B4B4B", Dark: "#D3D3D3"} + t := table.New(). + Border(lipgloss.NormalBorder()). + BorderStyle(lipgloss.NewStyle().Foreground(color)). + Headers("Type", "Name", "Accuracy", "Level", "Power"). + Rows(rows...) + + fmt.Fprintln(w, t) return nil } From 0ecec8bfd6e2abf9f12f729ede51756d0402838f Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Mon, 2 Jun 2025 14:21:05 -0700 Subject: [PATCH 04/12] updating tests --- testdata/pokemon_help.golden | 1 + testdata/pokemon_moves.golden | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 testdata/pokemon_moves.golden diff --git a/testdata/pokemon_help.golden b/testdata/pokemon_help.golden index 09a15504..028f7205 100644 --- a/testdata/pokemon_help.golden +++ b/testdata/pokemon_help.golden @@ -9,6 +9,7 @@ │ -a, --abilities Prints the Pokémon's abilities. │ │ -i=xx, --image=xx Prints out the Pokémon's default sprite. │ │ options: [sm, md, lg] │ +│ -m, --moves Prints the Pokemon's learnable moves. │ │ -s, --stats Prints the Pokémon's base stats. │ │ -t, --types Prints the Pokémon's typing. │ │ -h, --help Prints the help menu. │ diff --git a/testdata/pokemon_moves.golden b/testdata/pokemon_moves.golden new file mode 100644 index 00000000..25441c1e --- /dev/null +++ b/testdata/pokemon_moves.golden @@ -0,0 +1,28 @@ +Your selected Pokémon: Greninja +• National Pokédex #: 658 +• Weight: 40.0kg (88.2 lbs) +• Height: 4.9m (4′11″) +─────────────── +Learnable Moves +┌──────────────────┬────────┬──────────┬────────┬─────┐ +│Name │Level │Type │Accuracy│Power│ +├──────────────────┼────────┼──────────┼────────┼─────┤ +│Water Shuriken │0 │Water │100 │15 │ +│Pound │1 │Normal │100 │40 │ +│Growl │1 │Normal │100 │0 │ +│Water Gun │1 │Water │100 │40 │ +│Quick Attack │1 │Normal │100 │40 │ +│Night Slash │1 │Dark │100 │70 │ +│Role Play │1 │Psychic │0 │0 │ +│Haze │1 │Ice │0 │0 │ +│Lick │10 │Ghost │100 │30 │ +│Water Pulse │14 │Water │100 │60 │ +│Smokescreen │19 │Normal │100 │0 │ +│Shadow Sneak │23 │Ghost │100 │40 │ +│Spikes │28 │Ground │0 │0 │ +│Aerial Ace │33 │Flying │0 │60 │ +│Substitute │42 │Normal │0 │0 │ +│Extrasensory │49 │Psychic │100 │80 │ +│Double Team │56 │Normal │0 │0 │ +│Hydro Pump │68 │Water │80 │110 │ +└──────────────────┴────────┴──────────┴────────┴─────┘ From 66a6155cbf7fda3b0d29f82947e3d22b21cbe87a Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Mon, 2 Jun 2025 16:05:53 -0700 Subject: [PATCH 05/12] adding move flag option (#127) --- cmd/pokemon/pokemon.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/pokemon/pokemon.go b/cmd/pokemon/pokemon.go index 7709060c..30a04910 100644 --- a/cmd/pokemon/pokemon.go +++ b/cmd/pokemon/pokemon.go @@ -31,6 +31,7 @@ func PokemonCommand() (string, error) { fmt.Sprintf("\n\t%-30s %s", "-a, --abilities", "Prints the Pokémon's abilities."), fmt.Sprintf("\n\t%-30s %s", "-i=xx, --image=xx", "Prints out the Pokémon's default sprite."), fmt.Sprintf("\n\t%5s%-15s", "", hintMessage), + fmt.Sprintf("\n\t%-30s %s", "-m, --moves", "Prints the Pokemon's learnable moves."), fmt.Sprintf("\n\t%-30s %s", "-s, --stats", "Prints the Pokémon's base stats."), fmt.Sprintf("\n\t%-30s %s", "-t, --types", "Prints the Pokémon's typing."), fmt.Sprintf("\n\t%-30s %s", "-h, --help", "Prints the help menu."), @@ -38,7 +39,7 @@ func PokemonCommand() (string, error) { output.WriteString(helpMessage) } - pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag := flags.SetupPokemonFlagSet() + pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, moveFlag, shortMoveFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag := flags.SetupPokemonFlagSet() args := os.Args @@ -115,6 +116,13 @@ func PokemonCommand() (string, error) { } } + if *moveFlag || *shortMoveFlag { + if err := flags.MovesFlag(&output, endpoint, pokemonName); err != nil { + output.WriteString(fmt.Sprintf("error parsing flags: %v\n", err)) + return "", fmt.Errorf("error parsing flags: %w", err) + } + } + if *typesFlag || *shortTypesFlag { if err := flags.TypesFlag(&output, endpoint, pokemonName); err != nil { output.WriteString(fmt.Sprintf("error parsing flags: %v\n", err)) From 54b7449f666136c3439047d887cf1937044b8c3c Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Tue, 3 Jun 2025 09:48:05 -0700 Subject: [PATCH 06/12] updating tests for move flag (#127) --- flags/pokemonflagset_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flags/pokemonflagset_test.go b/flags/pokemonflagset_test.go index 21154179..91e34edb 100644 --- a/flags/pokemonflagset_test.go +++ b/flags/pokemonflagset_test.go @@ -13,7 +13,7 @@ import ( func TestSetupPokemonFlagSet(t *testing.T) { // Call the function to get the flag set and flags - pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag := SetupPokemonFlagSet() + pokeFlags, abilitiesFlag, shortAbilitiesFlag, imageFlag, shortImageFlag, moveFlag, shortMoveFlag, statsFlag, shortStatsFlag, typesFlag, shortTypesFlag := SetupPokemonFlagSet() // Check flag set properties assert.NotNil(t, pokeFlags, "Flag set should not be nil") @@ -29,6 +29,8 @@ func TestSetupPokemonFlagSet(t *testing.T) { {shortAbilitiesFlag, false, "Short abilities flag should be 'a'"}, {imageFlag, "", "Image flag default value should be 'md'"}, {shortImageFlag, "", "Short image flag default value should be 'md'"}, + {moveFlag, false, "Move flag default value should be 'moves'"}, + {shortMoveFlag, false, "Short move flag default value should be 'm'"}, {typesFlag, false, "Types flag should be 'types'"}, {shortTypesFlag, false, "Short types flag should be 't'"}, {statsFlag, false, "Stats flag should be 'stats'"}, From 145788fc3efc7d8d0469857b1a7a5e3b55903124 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Wed, 4 Jun 2025 08:34:34 -0700 Subject: [PATCH 07/12] adding learnable moves to lipgloss table (#127) --- flags/pokemonflagset.go | 74 ++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/flags/pokemonflagset.go b/flags/pokemonflagset.go index aedcb3f5..4d4b0a59 100644 --- a/flags/pokemonflagset.go +++ b/flags/pokemonflagset.go @@ -210,7 +210,7 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { baseURL := "https://pokeapi.co/api/v2/" pokemonStruct, _, _, _, _, _ := connections.PokemonApiCall(endpoint, pokemonName, baseURL) - _, err := fmt.Fprintln(w, header("Moves")) + _, err := fmt.Fprintln(w, header("Learnable Moves")) if err != nil { return err } @@ -238,18 +238,24 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { continue } + capitalizedMove := cases.Title(language.English).String(strings.ReplaceAll(moveName, "-", " ")) + capitalizedType := cases.Title(language.English).String(moveStruct.Type.Name) + moves = append(moves, MoveInfo{ Accuracy: moveStruct.Accuracy, Level: detail.LevelLearnedAt, - Name: moveName, + Name: capitalizedMove, Power: moveStruct.Power, - Type: moveStruct.Type.Name, + Type: capitalizedType, }) } } if len(moves) == 0 { - fmt.Fprintln(w, "No level-up moves found for Scarlet & Violet.") + _, err := fmt.Fprintln(w, "No level-up moves found for Scarlet & Violet.") + if err != nil { + return err + } return nil } @@ -261,24 +267,53 @@ func MovesFlag(w io.Writer, endpoint string, pokemonName string) error { // Convert to table rows var rows [][]string for _, m := range moves { + styledType := lipgloss. + NewStyle(). + Bold(true). + Foreground(lipgloss.Color(styling.ColorMap[strings.ToLower(m.Type)])). + Render(m.Type) + rows = append(rows, []string{ m.Name, - m.Type, - strconv.Itoa(m.Accuracy), strconv.Itoa(m.Level), + styledType, + strconv.Itoa(m.Accuracy), strconv.Itoa(m.Power), }) } // Build and print table color := lipgloss.AdaptiveColor{Light: "#4B4B4B", Dark: "#D3D3D3"} + t := table.New(). Border(lipgloss.NormalBorder()). BorderStyle(lipgloss.NewStyle().Foreground(color)). - Headers("Type", "Name", "Accuracy", "Level", "Power"). + StyleFunc(func(row, column int) lipgloss.Style { + var style lipgloss.Style + + switch column { + case 0: + style = style.Width(18) + case 1: + style = style.Width(8) + case 2: + style = style.Width(10) + case 3: + style = style.Width(10) + case 4: + style = style.Width(8) + } + + return style + }). + Headers("Name", "Level", "Type", "Accuracy", "Power"). Rows(rows...) - fmt.Fprintln(w, t) + _, err = fmt.Fprintln(w, t) + if err != nil { + return err + } + return nil } @@ -382,27 +417,6 @@ func TypesFlag(w io.Writer, endpoint string, pokemonName string) error { baseURL := "https://pokeapi.co/api/v2/" pokemonStruct, _, _, _, _, _ := connections.PokemonApiCall(endpoint, pokemonName, baseURL) - colorMap := map[string]string{ - "normal": "#B7B7A9", - "fire": "#FF4422", - "water": "#3499FF", - "electric": "#FFCC33", - "grass": "#77CC55", - "ice": "#66CCFF", - "fighting": "#BB5544", - "poison": "#AA5699", - "ground": "#DEBB55", - "flying": "#889AFF", - "psychic": "#FF5599", - "bug": "#AABC22", - "rock": "#BBAA66", - "ghost": "#6666BB", - "dragon": "#7766EE", - "dark": "#775544", - "steel": "#AAAABB", - "fairy": "#EE99EE", - } - // Print the header from header func _, err := fmt.Fprintln(w, header("Typing")) if err != nil { @@ -410,7 +424,7 @@ func TypesFlag(w io.Writer, endpoint string, pokemonName string) error { } for _, pokeType := range pokemonStruct.Types { - colorHex, exists := colorMap[pokeType.Type.Name] + colorHex, exists := styling.ColorMap[pokeType.Type.Name] if exists { color := lipgloss.Color(colorHex) style := lipgloss.NewStyle().Bold(true).Foreground(color) From 795d7617b9d0e8364caff330659e49792ad73c41 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Wed, 4 Jun 2025 08:37:47 -0700 Subject: [PATCH 08/12] updating number of allowed args --- cmd/utils/validateargs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/validateargs.go b/cmd/utils/validateargs.go index 28d28f98..3df37ae7 100644 --- a/cmd/utils/validateargs.go +++ b/cmd/utils/validateargs.go @@ -75,7 +75,7 @@ func ValidatePokemonArgs(args []string) error { return fmt.Errorf("%s", errMessage) } - if err := checkLength(args, 7); err != nil { + if err := checkLength(args, 8); err != nil { return err } From bac68ee033613940d235d8b75941202e2425604a Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 6 Jun 2025 08:37:40 -0700 Subject: [PATCH 09/12] updating tests --- cmd/utils/validateargs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/validateargs_test.go b/cmd/utils/validateargs_test.go index 4c907926..72fac475 100644 --- a/cmd/utils/validateargs_test.go +++ b/cmd/utils/validateargs_test.go @@ -165,7 +165,7 @@ func TestValidatePokemonArgs(t *testing.T) { // Testing too many arguments tooManyArgs := [][]string{ - {"poke-cli", "pokemon", "hypo", "--abilities", "-s", "--types", "--image=sm", "-m"}, + {"poke-cli", "pokemon", "hypo", "--abilities", "-s", "--types", "--image=sm", "-m", "-p"}, } expectedError := styling.StripANSI("╭──────────────────╮\n│Error! │\n│Too many arguments│\n╰──────────────────╯") From a45da3ab91565cbdf01bf27940eba60e3a0f4155 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 6 Jun 2025 08:38:01 -0700 Subject: [PATCH 10/12] updating version numbers --- .github/workflows/ci.yml | 2 +- .goreleaser.yaml | 2 +- Dockerfile | 2 +- README.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ae5483a..92d7ae58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ on: - main env: - VERSION_NUMBER: 'v1.2.4' + VERSION_NUMBER: 'v1.3.0' DOCKERHUB_REGISTRY_NAME: 'digitalghostdev/poke-cli' AWS_REGION: 'us-west-2' diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 71b18869..afc33db7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,7 +14,7 @@ builds: - windows - darwin ldflags: - - -s -w -X main.version=v1.2.4 + - -s -w -X main.version=v1.3.0 archives: - format: tar.gz diff --git a/Dockerfile b/Dockerfile index f74431f9..f340209a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN go mod download COPY . . -RUN go build -ldflags "-X main.version=v1.2.4" -o poke-cli . +RUN go build -ldflags "-X main.version=v1.3.0" -o poke-cli . # build 2 FROM --platform=$BUILDPLATFORM alpine:latest diff --git a/README.md b/README.md index e35dd07a..6d58bee1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ pokemon-logo

Pokémon CLI

version-label - docker-image-size + docker-image-size ci-status-badge
@@ -76,11 +76,11 @@ View future plans in the [Roadmap](#roadmap) section. 3. Choose how to interact with the container: * Run a single command and exit: ```bash - docker run --rm -it digitalghostdev/poke-cli:v1.2.4 [subcommand] flag] + docker run --rm -it digitalghostdev/poke-cli:v1.3.0 [subcommand] flag] ``` * Enter the container and use its shell: ```bash - docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.2.4 -c "cd /app && exec sh" + docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.3.0 -c "cd /app && exec sh" # placed into the /app directory, run the program with './poke-cli' # example: ./poke-cli ability swift-swim ``` From aaa6ad821fdb808cb1480a8715221226e0ba8b1d Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 6 Jun 2025 09:14:47 -0700 Subject: [PATCH 11/12] updating files to ignore --- .dockerignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 75cbad38..c480acf1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,4 +22,7 @@ go.work.sum # env file .env -dist/ \ No newline at end of file +dist/ + +# testdata +testdata/ \ No newline at end of file From e1f9c70cd9375b04e3e2506ee7d7b7e3a8c373c7 Mon Sep 17 00:00:00 2001 From: Christian Sanchez Date: Fri, 6 Jun 2025 09:30:37 -0700 Subject: [PATCH 12/12] updating checklist --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6d58bee1..d465baa0 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Below is a list of the planned/completed commands and flags: - [x] `-i | --image`: display a pixel image of the Pokémon. - [x] `-s | --stats`: display the Pokémon's base stats. - [x] `-t | --types`: display the Pokémon's typing. - - [ ] `-m | --moves`: display learnable moves. + - [x] `-m | --moves`: display learnable moves. - [x] `search`: search for a resource (`ability`, `berry`, `pokemon`, `move`) - [ ] `speed`: compare speed stats between two Pokémon. - [x] `types`: get data about a specific typing.