-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from luthermonson/pins
go1.21, latest hostsfile with indexing fixes, cleanup
- Loading branch information
Showing
407 changed files
with
30 additions
and
233,834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/dist | ||
/out | ||
/release | ||
|
||
dist/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,31 @@ | ||
# Go and compilation related variables | ||
BUILD_DIR ?= out | ||
|
||
BUILD_DIR ?= dist | ||
BINARY_NAME := goodhosts | ||
RELEASE_DIR ?= release | ||
|
||
# Add default target | ||
.PHONY: all | ||
all: build | ||
|
||
vendor: | ||
go mod vendor | ||
GOLANGCI_LINT_VERSION ?= v1.54.2 | ||
|
||
$(BUILD_DIR): | ||
mkdir -p $(BUILD_DIR) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
rm -rf vendor | ||
rm -fr release | ||
|
||
$(BUILD_DIR)/macos-amd64/$(BINARY_NAME): | ||
GOARCH=amd64 GOOS=darwin go build -o $(BUILD_DIR)/macos-amd64/$(BINARY_NAME) ./main.go | ||
|
||
$(BUILD_DIR)/linux-amd64/$(BINARY_NAME): | ||
GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/linux-amd64/$(BINARY_NAME) ./main.go | ||
golangci-lint: | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSIONM) | ||
|
||
$(BUILD_DIR)/windows-amd64/$(BINARY_NAME).exe: | ||
GOARCH=amd64 GOOS=windows go build -o $(BUILD_DIR)/windows-amd64/$(BINARY_NAME).exe ./main.go | ||
goimports: | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
|
||
.PHONY: cross ## Cross compiles all binaries | ||
cross: $(BUILD_DIR)/macos-amd64/$(BINARY_NAME) $(BUILD_DIR)/linux-amd64/$(BINARY_NAME) $(BUILD_DIR)/windows-amd64/$(BINARY_NAME).exe | ||
goreleaser: | ||
go install github.com/goreleaser/goreleaser@latest | ||
|
||
.PHONY: release | ||
release: clean cross | ||
mkdir $(RELEASE_DIR) | ||
tar cJSf $(RELEASE_DIR)/goodhosts-cli-macos-amd64.tar.xz -C $(BUILD_DIR)/macos-amd64 $(BINARY_NAME) | ||
tar cJSf $(RELEASE_DIR)/goodhosts-cli-linux-amd64.tar.xz -C $(BUILD_DIR)/linux-amd64 $(BINARY_NAME) | ||
tar cJSf $(RELEASE_DIR)/goodhosts-cli-windows-amd64.tar.xz -C $(BUILD_DIR)/windows-amd64 $(BINARY_NAME).exe | ||
release: | ||
goreleaser release | ||
|
||
pushd $(RELEASE_DIR) && sha256sum * > sha256sum.txt && popd | ||
ci: goimports golangci-lint | ||
goimports -d . | ||
golangci-lint run | ||
go test -v ./... | ||
|
||
.PHONY: build | ||
build: | ||
go build -o $(BINARY_NAME) ./main.go | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
192.168.1.88 myhostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.