Skip to content

Commit

Permalink
Add helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Furtado committed Feb 13, 2024
1 parent 6519a11 commit e3f4ce2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ESP32 driver for Microchip [MCP3204](https://www.microchip.com/en-us/product/MCP

## Documentation

Everything is on the [wiki](https://github.com/gfurtadoalmeida/esp32-driver-mcp320x/wiki).
Everything is at the [docs](/docs) folder.

## Code Size

Expand Down
24 changes: 24 additions & 0 deletions project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,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"
}
}

0 comments on commit e3f4ce2

Please sign in to comment.