-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathGNUmakefile
More file actions
52 lines (40 loc) · 1.78 KB
/
Copy pathGNUmakefile
File metadata and controls
52 lines (40 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
default: test
acctest: fmt
cd ./sdk/ && ACCTEST=1 go test -count=1 -race -v ./... -run '^TestAcc' && cd ../
fmt: tools
@echo "==> Fixing source code with gofmt..."
find . -name '*.go' | grep -v vendor | xargs gofmt -s -w
imports: tools
@echo "==> Fixing source code with goimports..."
goimports -w ./data-plane
goimports -w ./microsoft-graph
goimports -w ./resource-manager
goimports -w ./sdk
prepare:
@echo "==> Preparing the repository to be updated.."
@echo "==> 1. Resource Manager - Removing all existing generated files"
find ./resource-manager/ -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \;
@echo "==> 2. Resource Manager - Re-creating the directory structure in preparation"
mkdir -p ./resource-manager/
# TODO: enable Microsoft Graph support prior to enabling generation of that SDK
#@echo "==> 3. Microsoft Graph - Removing all existing generated files"
#find ./microsoft-graph/ -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \;
#@echo "==> 4. Microsoft Graph - Re-creating the directory structure in preparation"
#mkdir -p ./microsoft-graph/
test: fmt
cd ./sdk/ && go test -short -v ./... && cd ../
cd ./resource-manager/ && go test -v ./... && cd ../
cd ./microsoft-graph/ && go test -v ./... && cd ../
test-ci-sdk:
cd ./sdk/ && go test -short -v ./...
test-ci-resource-manager:
cd ./resource-manager/ && go test -v ./...
test-ci-microsoft-graph:
cd ./microsoft-graph/ && go test -v ./...
test-ci-data-plane:
cd ./data-plane/ && go test -v ./...
test-ci: test-ci-sdk test-ci-resource-manager test-ci-microsoft-graph test-ci-data-plane
tools:
@echo "==> installing required tooling..."
go install golang.org/x/tools/cmd/goimports@latest
.PHONY: fmt imports prepare test test-ci test-ci-sdk test-ci-resource-manager test-ci-microsoft-graph test-ci-data-plane tools