This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (56 loc) · 1.54 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
60
61
62
63
64
65
66
67
68
# configuration
MAKEFLAGS = --no-builtin-rules --silent --warn-undefined-variables
SHELL := sh
.DEFAULT_GOAL := help
.ONESHELL :
.SHELLFLAGS := -eu -c
BOX_ZIP_URL = https://az792536.vo.msecnd.net/vms/VMBuild_20190311/Vagrant/MSEdge/MSEdge.Win10.Vagrant.zip
BOX_FILE = "box.zip"
# configuration
color_off = $(shell tput sgr0)
color_bright = $(shell tput bold)
# convenience function to alert user to missing target
define missing_target
$(error Missing target. Specify with `target=<provider>`)
endef
.SILENT .PHONY: clear
clear:
clear
.SILENT .PHONY: help
help: # Displays this help text
$(info )
$(info $(color_bright)VAGRANT: WINDOWS 10$(color_off))
grep \
--context=0 \
--devices=skip \
--extended-regexp \
--no-filename \
"(^[a-z-]+):{1} ?(?:[a-z-])* #" $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?# "}; {printf "\033[1m%s\033[0m;%s\n", $$1, $$2}' | \
column \
-c2 \
-s ";" \
-t
$(info )
.SILENT .PHONY: up
up: # Starts and provisions the Vagrant environment
vagrant up
.SILENT .PHONY: reprovision
reprovision: # reprovisions the Vagrant environment
vagrant up --provision
.SILENT .PHONY: get-box
get-box: # fetches upstream file with Vagrant Box
curl \
--location \
--output "${BOX_FILE}" \
"${BOX_ZIP_URL}"
.SILENT .PHONY: unpack-box
unpack-box: # unpacks ZIP archive of upstream Vagrant Box
unzip \
-u \
"${BOX_FILE}"
.SILENT .PHONY: install-extpack
install-extpack: # installs VirtualBox Extension Pack (macOS with Homebrew only)
brew \
install \
--cask "virtualbox-extension-pack"