Skip to content

Commit

Permalink
nix: remove unnecessairy install dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Pentori <[email protected]>
  • Loading branch information
apentori committed Mar 18, 2024
1 parent 390db02 commit 5a206f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
35 changes: 2 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,50 +280,19 @@ endif
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG)

setup: ##@setup Install all tools
setup: setup-check setup-build setup-dev tidy
setup: setup-check setup-dev tidy

setup-check: ##@setup Check if Go compiler is installed.
ifeq (, $(shell which go))
$(error "No Go compiler found! Make sure to install 1.19.0 or newer.")
endif

setup-dev: ##@setup Install all necessary tools for development
setup-dev: install-lint install-mock install-modvendor install-protobuf tidy install-os-deps

setup-build: ##@setup Install all necessary build tools
setup-build: install-lint install-release install-gomobile install-junit-report
setup-dev: tidy install-os-deps

install-os-deps: ##@install Operating System Dependencies
_assets/scripts/install_deps.sh

install-gomobile: install-xtools
install-gomobile: ##@install Go Mobile Build Tools
GO111MODULE=on go install golang.org/x/mobile/cmd/...@5d9a3325
GO111MODULE=on go mod download golang.org/x/exp@ec7cb31e
GO111MODULE=off go get -d golang.org/x/mobile/cmd/gobind

install-lint: ##@install Install Linting Tools
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/[email protected]

install-junit-report: ##@install Install Junit Report Tool for Jenkins integration
GO111MODULE=on go install github.com/jstemmer/go-junit-report/v2@latest

install-mock: ##@install Install Module Mocking Tools
GO111MODULE=on go install github.com/golang/mock/[email protected]

install-modvendor: ##@install Install Module Vendoring Tool
GO111MODULE=on go install github.com/goware/[email protected]

install-protobuf: ##@install Install Protobuf Generation Tools
GO111MODULE=on go install github.com/kevinburke/go-bindata/[email protected]
GO111MODULE=on go install github.com/golang/protobuf/[email protected]

install-release: ##@install Install Github Release Tools
GO111MODULE=on go install github.com/c4milo/[email protected]

install-xtools: ##@install Install Miscellaneous Go Tools
GO111MODULE=on go install golang.org/x/tools/go/packages/[email protected]

generate-handlers:
go generate ./_assets/generate_handlers/
generate: ##@other Regenerate assets and other auto-generated stuff
Expand Down
2 changes: 1 addition & 1 deletion _assets/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ elif [[ -x $(command -v pacman) ]]; then
elif [[ -x $(command -v brew) ]]; then
brew install protobuf jq
elif [[ -x $(command -v nix-env) ]]; then
nix-env -iA nixos.protobuf3_17
nix-env -iA nixos.protobuf3_20
else
echo "ERROR: No known package manager found!" >&2
exit 1
Expand Down

0 comments on commit 5a206f3

Please sign in to comment.