-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
39 lines (33 loc) · 914 Bytes
/
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
MACOS_VERSION=sequoia-xcode
MACOS_VM_NAME=sequoia-codeql
.PHONY: deps
deps:
@echo " > Installing dependencies"
brew install hashicorp/tap/packer
brew install cirruslabs/cli/tart
brew install cirruslabs/cli/cirrus
.PHONY: build-vm
build-vm:
@echo " > Building macOS VM"
@packer init -upgrade ./templates/codeql.pkr.hcl
@packer build -var "macos_version=$(MACOS_VERSION)" -var "macos_vm_name=$(MACOS_VM_NAME)" ./templates/codeql.pkr.hcl
@echo " 🎉 Done! 🎉"
.PHONY: export-vm
export-vm:
@echo " > EXPORTING macOS VM: $(MACOS_VM_NAME)"
@tart export $(MACOS_VM_NAME)
@echo " 🎉 Done! 🎉"
.PHONY: codeql-db
codeql-db:
@echo " > Building CodeQL Database"
@cirrus run
@echo " 🎉 Done! 🎉"
@cirrus run --artifacts-dir artifacts
clean:
@echo " > Cleaning up"
@rm -rf ./artifacts
@rm -rf ./venv
@rm -rf ./xnu-codeql
@rm xnu-codeql.zip
@echo " 🎉 Done! 🎉"
.DEFAULT_GOAL := build-vm