Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 0752477

Browse files
committed
refactor: move main.go to cmd/docker-index folder
Signed-off-by: Yves Brissaud <[email protected]>
1 parent 1977311 commit 0752477

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

.github/workflows/go.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
go-version: 1.19
2020

2121
- name: Build
22-
run: go build -v
22+
run: go build -v ./cmd/docker-index
2323

2424
- name: Test
2525
run: go test -v ./...

.goreleaser.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ release:
66

77
builds:
88
- binary: &binary docker-index
9+
main: ./cmd/docker-index
910
goos:
1011
- linux
1112
- darwin

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN go mod download
1313
COPY . ./
1414

1515
# RUN go test
16-
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -trimpath
16+
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -trimpath -o index-cli-plugin ./cmd/docker-index
1717

1818
# runtime stage
1919
FROM scratch

Taskfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tasks:
1010

1111
go:build:
1212
cmds:
13-
- go build -o docker-index -ldflags="-w -s -X 'github.com/docker/index-cli-plugin/internal.version={{.GIT_COMMIT}}'"
13+
- go build -o docker-index -ldflags="-w -s -X 'github.com/docker/index-cli-plugin/internal.version={{.GIT_COMMIT}}'" ./cmd/docker-index
1414
env:
1515
CGO_ENABLED: 0
1616
vars:
File renamed without changes.

0 commit comments

Comments
 (0)