generated from gfurtadoalmeida/esp32-project-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
project.ps1
24 lines (23 loc) · 1.05 KB
/
project.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ProjectFolder = $PSScriptRoot
$EspIdfDockerImage = 'gfurtadoalmeida/esp32-docker-sonar:v5.1'
switch ($args[0]) {
'build' {
&docker.exe run --rm --env LC_ALL='C.UTF-8' -v ${ProjectFolder}:/project -w /project ${EspIdfDockerImage} idf.py build
}
'build-test' {
&docker.exe run --rm --env LC_ALL='C.UTF-8' -v ${ProjectFolder}:/project -w /project ${EspIdfDockerImage} idf.py build -C ./test
}
'clean' {
&docker.exe run --rm --env LC_ALL='C.UTF-8' -v ${ProjectFolder}:/project -w /project ${EspIdfDockerImage} idf.py fullclean
}
'clean-test' {
&docker.exe run --rm --env LC_ALL='C.UTF-8' -v ${ProjectFolder}:/project -w /project ${EspIdfDockerImage} idf.py fullclean -C ./test
}
Default {
Write-Host "Command not recognized. Valid commands:"
Write-Host "`t* build: build the main project"
Write-Host "`t* build-test: build the test project"
Write-Host "`t* clean: clean the main project build files"
Write-Host "`t* clean-test: clean the test project build files"
}
}