-
Notifications
You must be signed in to change notification settings - Fork 63
/
Makefile
59 lines (46 loc) · 2.02 KB
/
Makefile
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
53
54
55
56
57
58
59
.PHONY: all
all: build generate-integrations
.PHONY: test
test: run-unit-tests run-e2e-tests-local
.PHONY: run-unit-tests
run-unit-tests:
docker build . -t gotest && docker run -t --rm --name draft-test gotest test ./... -buildvcs=false
#TODO: add more e2e tests to the local testing
.PHONY: run-e2e-tests-local
run-e2e-tests-local: build
test/check_info_schema.sh;
.PHONY: generate-integrations
generate-integrations:
cd ./test; \
./gen_integration.sh; \
cd ..;
.PHONY: build
build:
GO111MODULE=on go build -v -o .
.PHONY: build-all
build-all: build-windows-amd64 build-linux-amd64 build-linux-arm64 build-darwin-amd64 build-darwin-arm64
.PHONY: build-windows-amd64
build-windows-amd64:
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/Azure/draft/cmd.VERSION=${DRAFT_VERSION}" -v -o ./bin/draft-windows-amd64.exe
.PHONY: build-linux-amd64
build-linux-amd64:
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/Azure/draft/cmd.VERSION=${DRAFT_VERSION}" -v -o ./bin/draft-linux-amd64
.PHONY: build-linux-arm64
build-linux-arm64:
GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/Azure/draft/cmd.VERSION=${DRAFT_VERSION}" -v -o ./bin/draft-linux-arm64
.PHONY: build-darwin-amd64
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/Azure/draft/cmd.VERSION=${DRAFT_VERSION}" -v -o ./bin/draft-darwin-amd64
.PHONY: build-darwin-arm64
build-darwin-arm64:
GOOS=darwin GOARCH=arm64 go build -ldflags "-X github.com/Azure/draft/cmd.VERSION=${DRAFT_VERSION}" -v -o ./bin/draft-darwin-arm64
.PHONY: clean-entra-app
clean-entra-app:
@read -p "Enter the display name of the Azure entra application to delete: " APP_DISPLAY_NAME; \
APP_ID_TO_DELETE=$$(az ad app list --display-name $$APP_DISPLAY_NAME | jq -r '.[].appId'); \
if [ -z "$$APP_ID_TO_DELETE" ]; then \
echo "No Azure entra application found with the specified display name: $$APP_DISPLAY_NAME"; \
else \
az ad app delete --id $$APP_ID_TO_DELETE; \
echo "Deleted Azure entra application with display name: $$APP_DISPLAY_NAME"; \
fi