Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds install-dependencies target in Makefile #351

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install: simplify docs go-install
# Reformat and simplify source files.
simplify:
## simplify: Format and simplify the go source code
@echo "Formating the go source code"
@echo "Formatting the go source code"
@gofmt -w -l -s .

.PHONY: lint
Expand Down Expand Up @@ -75,3 +75,23 @@ testlxd:
testmicrok8s:
## testmicrok8s: Run unit tests against microk8s
TF_ACC=1 TEST_CLOUD=microk8s go test ./... -v $(TESTARGS) -timeout 120m

.PHONY: install-snap-dependencies
install-snap-dependencies:
## install-snap-dependencies: Install snap dependencies for terraform-provider-juju
@echo "Installing snap dependencies"
ifneq ($(HAS_TERRAFORM),)
@echo "Refreshing terraform snap"
@sudo snap refresh terraform --classic
anvial marked this conversation as resolved.
Show resolved Hide resolved
else
@echo "Installing terraform snap"
@sudo snap install terraform --classic
anvial marked this conversation as resolved.
Show resolved Hide resolved
endif

.PHONY: install-dependencies
install-dependencies: install-snap-dependencies
## install-dependencies: Install all the dependencies
@echo "Installing dependencies"
anvial marked this conversation as resolved.
Show resolved Hide resolved