Skip to content

Commit e0ac7f0

Browse files
Merge pull request #287 from digitalghost-dev/1.10.2
1.10.2
2 parents 31176b4 + 0a32ff7 commit e0ac7f0

49 files changed

Lines changed: 1416 additions & 745 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
- main
3232

3333
env:
34-
VERSION_NUMBER: 'v1.10.1'
34+
VERSION_NUMBER: 'v1.10.2'
3535
DOCKERHUB_REGISTRY_NAME: 'digitalghostdev/poke-cli'
3636
AWS_REGION: 'us-west-2'
3737

@@ -94,7 +94,7 @@ jobs:
9494
uses: actions/checkout@v6
9595

9696
- name: Set up Go
97-
uses: actions/setup-go@v5
97+
uses: actions/setup-go@v6
9898
with:
9999
go-version: '1.25.9'
100100

@@ -140,7 +140,7 @@ jobs:
140140
--target dist/poke-cli_${{ env.VERSION_NUMBER }}_linux_${{ matrix.arch }}.apk
141141
142142
- name: Upload packages as artifacts
143-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v6
144144
with:
145145
name: linux-packages-${{ matrix.arch }}
146146
path: dist/*
@@ -156,13 +156,13 @@ jobs:
156156

157157
steps:
158158
- name: Download package artifact
159-
uses: actions/download-artifact@v4
159+
uses: actions/download-artifact@v7
160160
with:
161161
name: linux-packages-${{ matrix.arch }}
162162
path: packages/
163163

164164
- name: Install Cloudsmith CLI
165-
uses: cloudsmith-io/cloudsmith-cli-action@v1.0.8
165+
uses: cloudsmith-io/cloudsmith-cli-action@v2
166166
with:
167167
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
168168

@@ -184,13 +184,13 @@ jobs:
184184

185185
steps:
186186
- name: Download package artifact
187-
uses: actions/download-artifact@v4
187+
uses: actions/download-artifact@v7
188188
with:
189189
name: linux-packages-${{ matrix.arch }}
190190
path: packages/
191191

192192
- name: Install Cloudsmith CLI
193-
uses: cloudsmith-io/cloudsmith-cli-action@v1.0.8
193+
uses: cloudsmith-io/cloudsmith-cli-action@v2
194194
with:
195195
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
196196

@@ -212,13 +212,13 @@ jobs:
212212

213213
steps:
214214
- name: Download package artifact
215-
uses: actions/download-artifact@v4
215+
uses: actions/download-artifact@v7
216216
with:
217217
name: linux-packages-${{ matrix.arch }}
218218
path: packages/
219219

220220
- name: Install Cloudsmith CLI
221-
uses: cloudsmith-io/cloudsmith-cli-action@v1.0.8
221+
uses: cloudsmith-io/cloudsmith-cli-action@v2
222222
with:
223223
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
224224

@@ -267,7 +267,7 @@ jobs:
267267

268268
- name: Upload Report
269269
if: always()
270-
uses: actions/upload-artifact@v4
270+
uses: actions/upload-artifact@v6
271271
with:
272272
name: lychee-report
273273
path: ./lychee-report.md
@@ -285,23 +285,23 @@ jobs:
285285
docs
286286
287287
- name: Set up Docker Buildx
288-
uses: 'docker/setup-buildx-action@v3.0.0'
288+
uses: 'docker/setup-buildx-action@v4'
289289

290290
- name: Prepare Docker Build Context
291291
run: |
292292
mkdir docker-context
293293
rsync -av --exclude=docker-context . docker-context/
294294
295295
- name: Build and Export
296-
uses: 'docker/build-push-action@v5.0.0'
296+
uses: 'docker/build-push-action@v7'
297297
with:
298298
context: ./docker-context
299299
file: ./docker-context/docs/Dockerfile
300300
tags: docs:latest
301301
outputs: type=docker,dest=/tmp/docs.tar
302302

303303
- name: Upload Artifact
304-
uses: actions/upload-artifact@v4
304+
uses: actions/upload-artifact@v6
305305
with:
306306
name: docs
307307
path: /tmp/docs.tar
@@ -316,7 +316,7 @@ jobs:
316316
uses: actions/checkout@v6
317317

318318
- name: Configure AWS
319-
uses: aws-actions/configure-aws-credentials@v4
319+
uses: aws-actions/configure-aws-credentials@v6
320320
with:
321321
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
322322
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -327,7 +327,7 @@ jobs:
327327
uses: aws-actions/amazon-ecr-login@v2
328328

329329
- name: Download Artifact
330-
uses: actions/download-artifact@v4
330+
uses: actions/download-artifact@v7
331331
with:
332332
name: docs
333333
path: /tmp
@@ -365,22 +365,22 @@ jobs:
365365
uses: actions/checkout@v6
366366

367367
- name: Set up Docker Buildx
368-
uses: 'docker/setup-buildx-action@v3.0.0'
368+
uses: 'docker/setup-buildx-action@v4'
369369

370370
- name: Prepare Docker Build Context
371371
run: |
372372
mkdir docker-context
373373
rsync -av --exclude=docker-context . docker-context/
374374
375375
- name: Build and Export
376-
uses: 'docker/build-push-action@v5.0.0'
376+
uses: 'docker/build-push-action@v7'
377377
with:
378378
context: ./docker-context
379379
tags: poke-cli:${{ env.VERSION_NUMBER }}
380380
outputs: type=docker,dest=/tmp/poke-cli.tar
381381

382382
- name: Upload Artifact
383-
uses: actions/upload-artifact@v4
383+
uses: actions/upload-artifact@v6
384384
with:
385385
name: poke-cli
386386
path: /tmp/poke-cli.tar
@@ -396,7 +396,7 @@ jobs:
396396
uses: actions/checkout@v6
397397

398398
- name: Configure AWS
399-
uses: aws-actions/configure-aws-credentials@v4
399+
uses: aws-actions/configure-aws-credentials@v6
400400
with:
401401
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
402402
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -422,10 +422,10 @@ jobs:
422422
uses: actions/checkout@v6
423423

424424
- name: Set up Docker Buildx
425-
uses: 'docker/setup-buildx-action@v3.0.0'
425+
uses: 'docker/setup-buildx-action@v4'
426426

427427
- name: Download Artifact
428-
uses: actions/download-artifact@v4
428+
uses: actions/download-artifact@v7
429429
with:
430430
name: poke-cli
431431
path: /tmp
@@ -451,13 +451,13 @@ jobs:
451451

452452
steps:
453453
- name: Download SBOM
454-
uses: actions/download-artifact@v4
454+
uses: actions/download-artifact@v7
455455
with:
456456
name: poke-cli-sbom-${{ env.VERSION_NUMBER }}.spdx.json
457457
path: /tmp
458458

459459
- name: Scan SBOM
460-
uses: anchore/scan-action@v5
460+
uses: anchore/scan-action@v7
461461
id: scan
462462
with:
463463
sbom: /tmp/poke-cli-sbom-${{ env.VERSION_NUMBER }}.spdx.json
@@ -486,25 +486,25 @@ jobs:
486486

487487
- name: Docker Meta
488488
id: meta
489-
uses: 'docker/metadata-action@v5.0.0'
489+
uses: 'docker/metadata-action@v6'
490490
with:
491491
images: ${{ env.DOCKERHUB_REGISTRY_NAME }}
492492

493493
- name: Set up QEMU
494-
uses: 'docker/setup-qemu-action@v3'
494+
uses: 'docker/setup-qemu-action@v4'
495495

496496
- name: Set up Docker Buildx
497-
uses: 'docker/setup-buildx-action@v3.0.0'
497+
uses: 'docker/setup-buildx-action@v4'
498498

499499
- name: Login to Docker Hub
500-
uses: 'docker/login-action@v3'
500+
uses: 'docker/login-action@v4'
501501
with:
502502
username: ${{ secrets.DOCKERHUB_USERNAME }}
503503
password: ${{ secrets.DOCKERHUB_TOKEN }}
504504

505505
- name: Build and Push by Digest
506506
id: build
507-
uses: 'docker/build-push-action@v5.0.0'
507+
uses: 'docker/build-push-action@v7'
508508
with:
509509
context: .
510510
platforms: ${{ matrix.platform }}
@@ -519,7 +519,7 @@ jobs:
519519
520520
- name: Upload Digest for AMD64
521521
if: matrix.platform == 'linux/amd64'
522-
uses: actions/upload-artifact@v4
522+
uses: actions/upload-artifact@v6
523523
with:
524524
name: digests-amd64
525525
path: /tmp/digests/*
@@ -528,7 +528,7 @@ jobs:
528528

529529
- name: Upload Digest for ARM64
530530
if: matrix.platform == 'linux/arm64'
531-
uses: actions/upload-artifact@v4
531+
uses: actions/upload-artifact@v6
532532
with:
533533
name: digests-arm64
534534
path: /tmp/digests/*
@@ -541,24 +541,24 @@ jobs:
541541

542542
steps:
543543
- name: Download Digests
544-
uses: actions/download-artifact@v4
544+
uses: actions/download-artifact@v7
545545
with:
546546
pattern: digests-*
547547
path: /tmp/digests
548548
merge-multiple: true
549549

550550
- name: Set up Docker Buildx
551-
uses: 'docker/setup-buildx-action@v3.0.0'
551+
uses: 'docker/setup-buildx-action@v4'
552552

553553
- name: Docker meta
554554
id: meta
555-
uses: 'docker/metadata-action@v5.0.0'
555+
uses: 'docker/metadata-action@v6'
556556
with:
557557
images: ${{ env.DOCKERHUB_REGISTRY_NAME }}
558558
tags: ${{ env.VERSION_NUMBER }}
559559

560560
- name: Login to Docker Hub
561-
uses: 'docker/login-action@v3'
561+
uses: 'docker/login-action@v4'
562562
with:
563563
username: ${{ secrets.DOCKERHUB_USERNAME }}
564564
password: ${{ secrets.DOCKERHUB_TOKEN }}

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ builds:
1414
- windows
1515
- darwin
1616
ldflags:
17-
- -s -w -X main.version=v1.10.1
17+
- -s -w -X main.version=v1.10.2
1818

1919
archives:
2020
- formats: [ 'zip' ]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN go mod download
88

99
COPY . .
1010

11-
RUN go build -ldflags "-X main.version=v1.10.1" -o poke-cli .
11+
RUN go build -ldflags "-X main.version=v1.10.2" -o poke-cli .
1212

1313
# build 2
1414
FROM --platform=$BUILDPLATFORM alpine:3.23

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img width="425" src="poke-cli.png" alt="pokemon-logo"/>
33
<h4></h4>
44
<img src="https://img.shields.io/github/v/release/digitalghost-dev/poke-cli?style=flat-square&logo=git&logoColor=FFCC00&label=Release%20Version&labelColor=EEE&color=FFCC00" alt="version-label">
5-
<img src="https://img.shields.io/docker/image-size/digitalghostdev/poke-cli/v1.10.1?arch=arm64&style=flat-square&logo=docker&logoColor=FFCC00&labelColor=EEE&color=FFCC00" alt="docker-image-size">
5+
<img src="https://img.shields.io/docker/image-size/digitalghostdev/poke-cli/v1.10.2?arch=arm64&style=flat-square&logo=docker&logoColor=FFCC00&labelColor=EEE&color=FFCC00" alt="docker-image-size">
66
<img src="https://img.shields.io/github/actions/workflow/status/digitalghost-dev/poke-cli/ci.yml?branch=main&style=flat-square&logo=github&logoColor=FFCC00&label=CI&labelColor=EEE&color=FFCC00" alt="ci-status-badge">
77
</div>
88
<div align="center">
@@ -99,11 +99,11 @@ Cloudsmith is a fully cloud-based service that lets you easily create, store, an
9999
3. Choose how to interact with the container:
100100
* Run a single command and exit:
101101
```bash
102-
docker run --rm -it digitalghostdev/poke-cli:v1.10.1 <command> [subcommand] [flag]
102+
docker run --rm -it digitalghostdev/poke-cli:v1.10.2 <command> [subcommand] [flag]
103103
```
104104
* Enter the container and use its shell:
105105
```bash
106-
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.10.1 -c "cd /app && exec sh"
106+
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.10.2 -c "cd /app && exec sh"
107107
# placed into the /app directory, run the program with './poke-cli'
108108
# example: ./poke-cli ability swift-swim
109109
```
@@ -112,13 +112,13 @@ Cloudsmith is a fully cloud-based service that lets you easily create, store, an
112112
> The `card` command renders TCG card images using your terminal's graphics protocol. When running inside Docker, pass your terminal's environment variables so image rendering works correctly:
113113
> ```bash
114114
> # Kitty
115-
> docker run --rm -it -e TERM -e KITTY_WINDOW_ID digitalghostdev/poke-cli:v1.10.1 card
115+
> docker run --rm -it -e TERM -e KITTY_WINDOW_ID digitalghostdev/poke-cli:v1.10.2 card
116116
>
117117
> # WezTerm, iTerm2, Ghostty, Konsole, Rio, Tabby
118-
> docker run --rm -it -e TERM -e TERM_PROGRAM digitalghostdev/poke-cli:v1.10.1 card
118+
> docker run --rm -it -e TERM -e TERM_PROGRAM digitalghostdev/poke-cli:v1.10.2 card
119119
>
120120
> # Windows Terminal (Sixel)
121-
> docker run --rm -it -e WT_SESSION digitalghostdev/poke-cli:v1.10.1 card
121+
> docker run --rm -it -e WT_SESSION digitalghostdev/poke-cli:v1.10.2 card
122122
> ```
123123
> If your terminal is not listed above, image rendering is not supported inside Docker.
124124

card_data/pipelines/poke_cli_dbt/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'poke_cli_dbt'
2-
version: '1.10.1'
2+
version: '1.10.2'
33

44
profile: 'poke_cli_dbt'
55

card_data/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "card-data"
3-
version = "v1.10.1"
3+
version = "v1.10.2"
44
description = "File directory to store all data related processes for the Pokémon TCG."
55
readme = "README.md"
66
requires-python = ">=3.12"

cli.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,19 @@ func runCLI(args []string) int {
123123

124124
remainingArgs := mainFlagSet.Args()
125125

126-
commands := map[string]func() int{
127-
"ability": utils.HandleCommandOutput(ability.AbilityCommand),
128-
"berry": utils.HandleCommandOutput(berry.BerryCommand),
129-
"card": utils.HandleCommandOutput(card.CardCommand),
130-
"item": utils.HandleCommandOutput(item.ItemCommand),
131-
"move": utils.HandleCommandOutput(move.MoveCommand),
132-
"natures": utils.HandleCommandOutput(natures.NaturesCommand),
133-
"pokemon": utils.HandleCommandOutput(pokemon.PokemonCommand),
134-
"speed": utils.HandleCommandOutput(speed.SpeedCommand),
135-
"tcg": utils.HandleCommandOutput(tcg.TcgCommand),
136-
"types": utils.HandleCommandOutput(types.TypesCommand),
137-
"search": utils.HandleCommandOutput(search.SearchCommand),
126+
type commandFunc func([]string) (string, error)
127+
commands := map[string]commandFunc{
128+
"ability": ability.AbilityCommand,
129+
"berry": berry.BerryCommand,
130+
"card": card.CardCommand,
131+
"item": item.ItemCommand,
132+
"move": move.MoveCommand,
133+
"natures": natures.NaturesCommand,
134+
"pokemon": pokemon.PokemonCommand,
135+
"speed": speed.SpeedCommand,
136+
"tcg": tcg.TcgCommand,
137+
"types": types.TypesCommand,
138+
"search": search.SearchCommand,
138139
}
139140

140141
cmdArg := ""
@@ -157,7 +158,7 @@ func runCLI(args []string) int {
157158
currentVersion()
158159
return 0
159160
case exists:
160-
return cmdFunc()
161+
return utils.HandleCommandOutput(cmdFunc, remainingArgs)()
161162
default:
162163
msg := fmt.Sprintf("\t%-15s", fmt.Sprintf("'%s' is not a valid command.\n", cmdArg)) +
163164
styling.StyleBold.Render("\nCommands:") +

cli_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ func TestRunCLI(t *testing.T) {
108108

109109
for _, tt := range tests {
110110
t.Run(tt.name, func(t *testing.T) {
111-
originalArgs := os.Args
112-
os.Args = append([]string{"poke-cli"}, tt.args...)
113-
defer func() { os.Args = originalArgs }()
114-
115111
var exitCode int
116112
output := captureOutput(func() {
117113
exitCode = runCLI(tt.args)

0 commit comments

Comments
 (0)