Skip to content

Commit

Permalink
(fix) Move code to v2 directory as this is correct for v2 of a Go pro…
Browse files Browse the repository at this point in the history
…ject

Signed-off-by: Drew Robinson <[email protected]>
  • Loading branch information
ocean committed Dec 27, 2024
1 parent 08e78dd commit 9d46397
Show file tree
Hide file tree
Showing 75 changed files with 23,384 additions and 9 deletions.
18 changes: 16 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
version: 2
before:
hooks:
- go mod tidy
- cd v2 && go mod tidy

builds:
- binary: >-
- dir: v2
binary: >-
{{ .ProjectName }}-bin-
{{- .Os }}-
{{- .Arch }}
Expand All @@ -19,6 +20,12 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm64:
- v9.0
ignore:
- goos: windows
goarch: arm
flags:
- -trimpath
- -v
Expand Down Expand Up @@ -49,6 +56,13 @@ changelog:

sboms:
- artifacts: binary

binary_signs:
- {}

signs:
- artifacts: checksum

# release:
# github:
# owner: ahoy-cli
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ ARCH := amd64 arm64
TESTARGS ?=

default:
go build -ldflags $(LDFLAGS) -v -o ./ahoy
cd v2 && go build -ldflags $(LDFLAGS) -v -o ./ahoy

install:
cp ahoy /usr/local/bin/ahoy
cp ./v2/ahoy /usr/local/bin/ahoy
chmod +x /usr/local/bin/ahoy

build_dir:
mkdir -p ./builds
mkdir -p ./v2/builds

cross: build_dir
cd v2
$(foreach os,$(OS), \
$(foreach arch,$(ARCH), \
GOOS=$(os) GOARCH=$(arch) go build -trimpath -ldflags $(LDFLAGS) -v -o ./builds/ahoy-bin-$(os)-$(arch); \
Expand All @@ -33,7 +34,7 @@ cross: build_dir
$(foreach arch,$(ARCH),mv ./builds/ahoy-bin-windows-$(arch) ./builds/ahoy-bin-windows-$(arch).exe;)

clean:
rm -vRf ./builds/ahoy-bin-*
rm -vRf ./v2/builds/ahoy-bin-*

fmtcheck:
$(foreach file,$(SRCS),gofmt $(file) | diff -u $(file) - || exit;)
Expand All @@ -47,10 +48,10 @@ vet:

gocyclo:
@ go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -over 25 -avg -ignore "vendor" .
gocyclo -over 25 -avg -ignore "vendor" ./v2

test: fmtcheck staticcheck vet
go test *.go $(TESTARGS)
go test ./v2/*.go $(TESTARGS)

version:
@echo $(VERSION)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion go.mod → v2/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ahoy-cli/ahoy
module github.com/ahoy-cli/ahoy/v2

go 1.20

Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions v2/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md

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

14 changes: 14 additions & 0 deletions v2/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go

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

Loading

0 comments on commit 9d46397

Please sign in to comment.