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
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 24 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,26 @@ testlxd:
testmicrok8s:
## testmicrok8s: Run unit tests against microk8s
TF_ACC=1 TEST_CLOUD=microk8s go test ./... -v $(TESTARGS) -timeout 120m

PACKAGES=terraform golangci-lint go
# Function to check if Snap packages are installed
check-snap-package:
@for package in $(PACKAGES); do \
if snap list $$package >/dev/null 2>&1; then \
echo "Package $$package is already installed."; \
else \
echo "Package $$package is not installed."; \
sudo snap install $$package --classic; \
fi; \
done

.PHONY: install-snap-dependencies
install-snap-dependencies: check-snap-package
## install-snap-dependencies: Install all the snap dependencies

.PHONY: install-dependencies
install-dependencies: install-snap-dependencies
## install-dependencies: Install all the dependencies



6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ _Note:_ These features may not have functional parity with the juju cli at this

1. Clone the repository
1. Enter the repository directory
1. Build the provider dependencies using the make `install-dependencies` target:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we're not actually building the dependencies, suggest:

"Install the provider requirements and dependencies using the make install-dependencies target:"


```shell
make install-dependencies
```

1. Build the provider using the make `go-install` target:

```shell
Expand Down